aspose file tools*
The moose likes Beginning Java and the fly likes is static concept is same in all the JVM's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "is static concept is same in all the JVM Watch "is static concept is same in all the JVM New topic
Author

is static concept is same in all the JVM's

NagarajGoud uppala
Ranch Hand

Joined: Nov 13, 2008
Posts: 86
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.


I know Life is very Tough...But I AM TOUGHER
SCJP 1.5
Ajay Pinnaka
Greenhorn

Joined: Aug 07, 2008
Posts: 15
Static concept is not JVM dependent i guess.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

Everything that is defined in the Java Language Specification must be the same within all JVMs. How static behaves is part of that.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
pankaj vijay
Ranch Hand

Joined: Apr 01, 2008
Posts: 75
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.


Pankaj Vijay (SCJP, SCBCD)
Learn Core Java,Learn Servlet Jsp, SCJP Questions,Struts Tutorial
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is static concept is same in all the JVM's