Java - Which are the different segments of memory used by JVM ?

1. Stack Segment

Contains local variables and Reference variables(variables that hold the address of an object in the heap)

2. Heap Segment 

Contains all created objects in runtime, objects only plus their object attributes (instance variables)

3. Code Segment 

The segment where the actual compiled Java bytecodes resides when loaded.