Execution Engine
Execution Engine Phase Once .class files are loaded, linked, and initialized, the JVM moves into execution phase. Execution Engine is the place Where Code actually Runs It contains:- Interpreter JIT (Just in Time) Garbage Collector 1. Interpreter Interpreter reads bytecode one instruction at a time and executes it immediately. Interpreter works like: Read instruction 1 → execute Read instruction 2 → execute Read instruction 3 → execute Very fast startup, No waiting for compilation and Slower for long-running programs 2. JIT Compiler (Just-in-time) Detects hot methods(frequently executed) Converts bytecode - native machine code Stores optimized code for reuse It results, Much faster execution and JVM becomes faster over time What are “Hot Methods”? Methods inside loops Frequently called methods Business logic methods in servers Why JIT makes JVM faster Once compiled: JVM does not interpret again CPU runs native machine code directly Execution becomes much faster When y...