The best advice I give to n00bs is: do not shove all your code into the main method.

Break the program down into smaller chunks and each chunk goes into its own method. For your problem you have...