Try debugging the code by adding some println statements that show where the execution flow is going and what the values of the variables are as it executes so you can see what the computer sees as...
Type: Posts; User: Norm
Try debugging the code by adding some println statements that show where the execution flow is going and what the values of the variables are as it executes so you can see what the computer sees as...
Can you copy the contents of the console window for when you execute the program and post it here?
Add some comments to the printout saying what is wrong with the output and show what it should be....