In general, we can say JVM is a program which takes byte code(.class file[the compilation of .java file]) and converts into machine instruction then providing an execution engine that is JAVA interpreter named as java which executes source code line by line.
Now we will discuss JVM in detail.
Assume that we have a java program(.java file). the java compiler javac compiles and generates .class file which is called as byte code. This byte code is the input of JVM. That means JVM takes .class file, then load it and execute it.
JVM consists of 3 modules, such as:
Then class loader subsystem communicates with various memory area inside JVM.
There are 5 memory areas available inside JVM, such as method area, heap area, stack area, PC register, native method stack area.
Note :
The data which is stored in method area and heap area is not thread-safe whereas the data stored in the stack area and PC registers are thread-safe.
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc