Update Main.java

fixed a problem with new line \n and \r