Update Main.java

Compile all initialized data into a method