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

0 votes
59 views
simron shukla asked 11-Mar-2018 in programming by simron shukla
How will you explain Java memory model in simple terms to a beginner?


1 Answer

0 votes
Sanat Shukla answered 08-Aug-2018 by Sanat Shukla
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?