Update Main.java

Change the static control to dynamic type.