Update Main.java

Updating Main class.