A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
query on static varibale
Joined: Jul 29, 2008
Aug 17, 2008 00:21:00
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?
Joined: May 31, 2007
Aug 17, 2008 02:29:00
why do you think it cannot be modified? if you do not want to modify it mark it as final.
private static final String myVariable ="Test";
[ August 17, 2008: Message edited by: arulk pillai ]
500+ Java Interview Questions and Answers | Java job hunting know how & Java resumes
It is sorta covered in the
JavaRanch Style Guide
subject: query on static varibale
Dont declare global variables in Servlet
about protected n static
Best Practice for getters and setters
Fix an infity loop
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014