Hi, everyone.

I'm a bit confusing.
Could someone tell me whether my understanding is right or not
and if it is not, in what part...

Static method (in a class) is a method which NEVER be instanciate.
that is, Static method is used as it is and never allocated anew for each uses.
that is, you cannot use instance variables (I mean by "instance variables" the
variables which is declared within the method) , or the value of that variables
can be altered in any time (by another call of this method from elsewhere
which tries to run this very method from the beginning and may alter the value
along to it).

Of course, if the variable declared within a method have initial value
and never changed its value throughout the method, it seems OK...
for you can get the same value all the time being...
But if you change the value, it will affect to others and the result
might be untrustworthy.

Uh...
Are there any flaw in this thinking?  For I found some code openly available
contains static methods which declare variables in them.


I would be delighted if someone can makes me wise.
Thank you.

Emiko Kezuka 



To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to