This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes query on static varibale Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "query on static varibale " Watch "query on static varibale " New topic
Author

query on static varibale

abin joy
Ranch Hand

Joined: Jul 29, 2008
Posts: 35
I have a static variable in class.I can change the value of that variable in a method in the same class.How this is possible?
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3219
why do you think it cannot be modified? if you do not want to modify it mark it as final.



[ August 17, 2008: Message edited by: arulk pillai ]

Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: query on static varibale
 
Similar Threads
Static variable
about protected n static
Fix an infity loop
Best Practice for getters and setters
Dont declare global variables in Servlet