How are you debugging the code? I don't see any calls to the println() method to print out values as the code is executed. You need to add some println statements to tell you what the computer sees...