• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

is static concept is same in all the JVM's

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Static concept is not JVM dependent i guess.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic