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
118 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,160 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
32 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
125 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
286 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
30 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,600 points
99 views
0 votes
1 answer

Reserving space for a heap object

I too encountered this problem and tried ...READ MORE

answered May 31, 2018 in Java by geek.erkami
• 2,320 points
110 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
926 views
+6 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
67,120 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,160 points
95 views
0 votes
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,160 points
1,325 views