So two other quick notes.
1. Your formatting is not completely consistent, and really does not follow java convention.
1a. Sure you dont have to follow java convention, but if you ever work as part of a team, it sure is nice if everyone speaks the same language, right? No need to be different. When I write in java, I try to stick to java convention, and when I write c++, I stick to that convention. However...
1b. Whether or not you stick to convention, you should at least be consistent. You should always indent the same, put brackets on the line above or on their own line etc. Granted some of the formatting may have been lost from your pc to the forum...
2. Comments. Not a single comment in the code. It is nice to see a comment at the top that describes the purpose and use of the class (program). Then once you get into the business of the code, each little body (ok not EVERY ONE) could use a little one-liner. Just a note to remember what you meant for that line to do. Sure you can read the code and figure out what it does. But what happens when it is not working, and it is not a syntax error. It is an ugly logic error. If you look at a line that says:
It is easy to assume the total is the sum of a and b. What if in fact total was not supposed to be the sum, instead you meant to multiply. Seeing a+b may not catch your eyes as an error, so you get to share some blood with the desk for an hour while you try to get it. Throwing in a comment like //product of this and that would make a+b stand out as not what you meant to do. Ok so that very low level example is not a suggestion to comment every time you add or multiply something, but just an example of how something can look right, and be so wrong.