aspose file tools
The moose likes Java in General and the fly likes why jvm gives special treatment to static variables Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "why jvm gives special treatment to static variables" Watch "why jvm gives special treatment to static variables" New topic
Author

why jvm gives special treatment to static variables

krishna Gajarla
Greenhorn

Joined: Oct 02, 2005
Posts: 21
1.why jvm gives special treatment to static variables,static methods?

2.why static variables are not serialized?

can any body please give me the ansewers or the related resource
so that i can go through.


Thanks in advance.
bye
krishna


Thanks and Regards,<br />krishna<br />------------------<br />Charles Darwin: <br />"It is not the strongest of the species that survives, <br />nor the most intelligent, <br />but the one most responsive to change"
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
1) I'm not sure what you are referring to. What do you mean by "special treatment"?

2) You serialize objects, but static fields don't belong to objects.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: why jvm gives special treatment to static variables
 
Similar Threads
What is the need for marker interface ?
Reg : marker interface
Method Inner Classes &Final Variable
java.util.Arrays - why return static variables?
islands of isolation(Garbage Collection)