Please Edit your post and wrap your code with
<YOUR CODE HERE> to get highlighting. Unformatted code is hard to read and understand.

Try debugging your code by adding println statements to...