You cannot have "inner methods" in java. It looks like you have a method inside the main method.