What is JVM ?
- Java virtual machine is an abstract machine or a specification which provides an environment for execution of the byte code.
- JVM can perform the following task such as :-
- Loading the byte code.
- Verifying the byte code.
- Executing the byte code.
- The internal structure of the JVM is –
The JVM can classified different parts like-Class Loader , Memory Area and Execution Engine.
- It is a part of JVM which loads the java program or java byte codes in the memory.
JVM has different Memory area like – Class area, Heap area, Stack area, Pc Register, and Native method stack area.
The Class area is used to store the detail information of data members and member methods.
- This memory is used to allocate the object which as created during the time of execution.
- In other word the heap area is used to allocate the object during the time of execution.
- The stack area is used to store all the local variables which are used in the program & also store the details information about the invocation of the method.
- It means when a method is invoked a frame is created in stack area & after invocation a flame is removed from the stack area.
It is an another memory which stores the address of JVM instruction
- It is another part of java virtual machine, which contain the java interpreter for converting the byte code into machine executable code according to the local machine.