| Memory Area | Purpose | |-------------|---------| | | Stores all objects and arrays (shared across threads) | | Stack | Stores method calls, local variables, and partial results (per thread) | | Method Area | Stores class metadata, static variables, constants | | Program Counter (PC) Register | Keeps track of current executing instruction | | Native Method Stack | Supports native methods written in other languages | JRE vs JDK vs JVM It's important to understand the distinction:
| Component | Description | |-----------|-------------| | | Abstract machine that executes bytecode (part of JRE) | | JRE | Runtime environment = JVM + Libraries + Other components | | JDK | Development Kit = JRE + Compiler + Debugger + Development tools | what is runtime environment in java