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

Primitive Data Types in java

let - Keyword in JavaScript (Block scope)

Coding Problem 4: Smallest window containing 0, 1 and 2 [GFG - Problem Solving]