What happened internally when we execute class file java

 When we execute the class file using the "java <class file >" command internally below operations is performed.

  1. Start JVM
  2. Create and Start the main thread: JVM will create a main thread and start that thread.
  3. Locate the class file
  4. Load the class file
  5. Execute the main method
  6. Unload the class
  7. terminated main thread
  8. Shutdown JVM


Comments

Popular posts from this blog

Coding Problem 3 - Weather Observation Station 7 [HackerRank - SQL]

public static void main(String [] args) - Full Explanation

Primitive Data Types in java