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, 2019 in Java by Prachi
1,028 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, 2019 by Priyaj
• 57,530 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, 2019 in Java by Mariyam
106 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,580 points
281 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, 2019 in Java by Frankie
• 9,810 points
2,344 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, 2019 in Java by Wasim
101 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 Parth
• 4,640 points
1,101 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, 2019 in Java by Sirajul
• 50,320 points
194 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,430 points
2,107 views
+9 votes
12 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
183,983 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
• 57,530 points
142 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, 2019 in Java by Priyaj
• 57,530 points
12,476 views