Try debugging the code by adding println statements to show where the execution flow goes and to show the values of variables used in the code. The print out will show you what the computer sees...