Update main.java

close #1