From version JDK6 onwards, the main method is mandatory to start code execution. If your program does not contain "main" method, you will get a run-time error. Please note that in the absence of "main" method your entire program will successfully compile but it will throw an error at runtime.

BY Best Interview Question ON 13 Jan 2019