• Post Reply Bookmark Topic Watch Topic
  • New Topic

Static variable in 2 different JVMs run in the same machine  RSS feed

 
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
22
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!