What is the return type of the main method?
In the java programming the Main() method doesn't return anything hence declared void. In Java, you need to have a method named main in at least one class. The following is what must appear in a real Java program.
Hope this reference will very helpful for java beginners.