Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Static variable in 2 different JVMs run in the same machine

 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I have a little problem in keyword static. I now that there is only one static variable regardless how many objects I created. How about 2 different JVM that run in the same machine ?


thanks


Jeffry Kristianto Yanuar
 
Steve Luke
Bartender
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They will have separate instances. Memory won't be shared between JVMs
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, thanks.

Jeffry Kristianto Yanuar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic