JRE And Data Areas
what is JRE?
JRE stands for Java runtime environment which comes with JDK and IDEs. It is used to run Java code on RAM.
For different aspects of code, it has different data areas to store them. Following are the data areas and the data they store:
Stack: It is the area where methods are executed. The first method that comes here is the last one to end and vice versa. The main function is the first one to come and end at last thus ending the program.
Heap: It is the area where objects and instance variables are stored. It also has a place called String Constant Pool where string objects are stored(We will study it further).In simple terms, Everything made with the "new" keyword is stored in the heap area although there are some exceptions.
Method Area: Before Java 8 static components used to store here Now, They are stored in heap.