• Post Reply Bookmark Topic Watch Topic
  • New Topic

static variable location  RSS feed

 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know where does Static variables defined in class in JVM memory model ? Means when we compile and run classes with static variables, where does static variable resides ?
I think it is Perm Gen space
Please confirm
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this out of academic interest? In my experience, this kind of information is totally irrelevant for a programmer.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16058
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, perm gen space does not exist anymore since Java 8.
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for late reply.
This question is being asked in interview.

Thanks for the reply.
 
Campbell Ritchie
Marshal
Posts: 56533
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In which case, what did you say?
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perm Gen space
 
Campbell Ritchie
Marshal
Posts: 56533
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why did you say that and not, “inside the Class objects”?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!