Logo F2FInterview

Java Interview Questions

Q   |   QA

No not required. main() method should be defined only if the source class is a java application.

Main() method doesn't return anything hence declared void.

main() method is called by the JVM even before the instantiation of the class hence it is declared as static.

main() method accepts an array of String object as arguement.


In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: