What are the types of memory in JVM?

+1 vote
I am new to Java and I am finding it difficult to understand where are all the different variables are stored? Is there any special type of memory? if yes can someone help me with the different types of it?
Mar 6 in Java by Prachi
306 views

1 answer to this question.

+1 vote

The different types of Memory in JVM are as follows:

Method area : All class level information like class name, are stored, including static variables.

Heap area : Information of all objects is stored in heap area.

Stack area : JVM create one run-time stack for all the functions which is stored here.

PC Registers : Stores the address of current execution instruction of a thread.

Native method stacks : Separate native stack is created for every thread and it stores native information.

answered Mar 7 by Priyaj
• 56,900 points

Related Questions In Java

0 votes
1 answer

What are the different types of constructor in StringBuilder class?

There are different types of StringBuilder constructor ...READ MORE

answered Mar 5 in Java by Mariyam
46 views
0 votes
1 answer

What is the concept of Immutability for strings in Java ? Why are strings immutable ?

According to Effective Java, chapter 4, page 73, ...READ MORE

answered May 11, 2018 in Java by Rishabh
• 3,540 points
169 views
0 votes
1 answer

What are the different methods of session management in servlets?

Session is a conversational state between client ...READ MORE

answered Feb 17 in Java by Frankie
• 9,810 points
753 views
0 votes
1 answer

What are the different ways of comparing Strings in Java?

The different ways of comparing string in ...READ MORE

answered Mar 5 in Java by Wasim
52 views
0 votes
1 answer

Is it possible to create a memory leak with Java

Here's a good way to create a memory ...READ MORE

answered May 30, 2018 in Java by parth295
• 4,640 points
332 views
0 votes
2 answers

Reserving space for a heap object

Run the JVM with -XX:MaxHeapSize=512m (or any big number ...READ MORE

answered Aug 26 in Java by Sirajul
• 29,340 points
144 views
0 votes
1 answer

java.lang.OutOfMemoryError: GC overhead limit exceeded Error

This simply means that for some reason ...READ MORE

answered May 31, 2018 in Java by misc.edu04
• 1,380 points
1,468 views
+7 votes
11 answers

Default parameters of XMS and XMX in JVM

You use these Java command-line parameters to ...READ MORE

answered Nov 13, 2018 in Java by Murali
112,775 views
+4 votes
1 answer

How to print the individual occurance of elements in Java?

You can use a HashMap to serve ...READ MORE

answered Dec 4, 2018 in Java by Priyaj
• 56,900 points
108 views
+1 vote
4 answers

What is difference between access modifier and access specifier in java

Access Specifier:- This can be understood as ...READ MORE

answered Feb 14 in Java by Priyaj
• 56,900 points
4,655 views