How will you explain Java memory model in simple terms to a beginner?

Asked 11-Mar-2018
Viewed 1021 times

0

How will you explain Java memory model in simple terms to a beginner?



1 Answer


0

Whenever the Java virtual machine has executed any program, then it requires more memory to store several things, including like bytecodes and other information it extracts from loaded class files, parameters to the methods, intermediate results of computations, returns values, objects of the program instantiate, and local variables. Where JVM has managed memory allocation for the ongoing programs.

There are some memory areas for Java Virtual Machine like as -
 A). Stack Area
B). Heap Area
C).  Method Area
D). Native Method(Stack)
E). PC Registers
How will you explain Java memory model in simple terms to a beginner?