| Author |
is a static final variable a class variable??
|
yuvraj kotegar
Ranch Hand
Joined: Jul 31, 2008
Posts: 120
|
|
example class Abc { public static final int BOSS=10; } is it a class variable???
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Yes it is.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
yuvraj kotegar
Ranch Hand
Joined: Jul 31, 2008
Posts: 120
|
|
Thanks Rob for the quick reply.
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
|
But do you see why it's a class variable?
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
chander shivdasani
Ranch Hand
Joined: Oct 09, 2007
Posts: 206
|
|
The values of Static variables are persistent across all the objects in a particular class. In other words, Only one copy of the variable is maintained for the whole class. Hence,Static variables are called as Class variables.
|
Enjoy, Chander
SCJP 5, Oracle Certified PL/SQL Developer
|
 |
 |
|
|
subject: is a static final variable a class variable??
|
|
|