• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is static concept is same in all the JVM's

 
NagarajGoud uppala
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i faced a question in one of the interviews please any body clarify me.
is the static concept is same in all the jvm's?

i told him generally some of the things are different in different jvm's(because all the jvm's implementation is not same)
but static is the standard concept so i think it is same

i don't know weather it is correct or not .please some one help me

Thanks,
Nagaraju.
 
Ajay Pinnaka
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Static concept is not JVM dependent i guess.
 
Rob Spoor
Sheriff
Pie
Posts: 20546
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything that is defined in the Java Language Specification must be the same within all JVMs. How static behaves is part of that.
 
pankaj vijay
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
static concept is same in every JVM but as my idea question should be somehow like this that whats the static visibility OR value in different JVM's. As every JVM has different value for the same static variable if you are running the application in cluster environment. static variable is a class variable so every JVM will have its own value if you are using more than one JVM. This logic works only in cluster environment.
Normally every object has different value OR its own value for a instance variable. Same is with JVM in the matter of static variable.

may be i didn't clear it very much But this is somehow like this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic