Posts tagged "Main Method in Java "

Tag Archives: Main Method in Java

Does JVM create object of Main class ?

Does JVM create object of Main class ? It’s a common and important Interview Question in Java or Automation QA Interview. The answer of this is “NO“, JVM doesn’t create the Object of the Main Class.   Let’s consider the following program:-

Output: Hello   We have studied that the reason for main() static in … Continue reading Does JVM create object of Main class ?

Working of main Method in Java

Let’s understand the working of Main method in Java, Main() method is necessary to start the java application, main() method in Java is a standard method which is used by JVM to start execution of any Java program. The main() method is referred as an entry point of Java application. main() method in Java is run by the main thread which is a non-daemon thread and … Continue reading Working of main Method in Java