Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static variable

 
deepak marathe
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where is the static variable stored in the memory?
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that it is stored in the Class (Class object) class instance for the class. Each class has a Class instance loaded into the JVM. This is used to create instances of the class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic