| Author |
static final variable in non-static Inner class
|
Prakash Rai
Ranch Hand
Joined: Jan 10, 2011
Posts: 101
|
|
As we say that static declaration is not Allowed in Non-static Inner class . Then why static final variable is allowed?
|
 |
Jeff Verdegan
Bartender
Joined: Jan 03, 2004
Posts: 5855
|
|
|
Because the compiler can get rid of the variable and just replace all uses of it with the constant.
|
 |
 |
|
|
subject: static final variable in non-static Inner class
|
|
|