Chapter 1 – Evolution of Java Virtual Machine
- Java code is compiled to bytecode. JVM uses interpreters to convert the bytecode to machine language and uses JIT compilers to compile the most commonly used code snippets (hotspots). This approach helps Java to achieve "write-once run-anywhere," as a result of which programmers don't have to write machine-specific code.
- A class loader subsystem is responsible for loading the classes. It not only finds the classes, but also verifies and resolves the classes.
- JVM has five memory areas:
a. Method: A shared area, where all the class-level data is stored at the JVM level
b. Heap: All instance variables and objects stored at the JVM level (shared across threads)
c. Stack: A runtime stack per thread to store the local variables at the method scope, as well as operands and frame data
d. Registries: PC registers with the addresses of current executing instructions (for each thread)
e. Native method stack: Native method...