Here is the rule: If inner class is declared in a method then it can access only final variables of the particular method but can access all variables of the enclosing class. look the code below carefully!!!
System.out.println(z); will give you error because z is declared in Innermethod01 as int z = 1; not final! wow! so inorder to compile it make it final and declare in Innermethod01 as final int z =1. -----------------------
[ June 11, 2007: Message edited by: Barry Gaunt ]
SCWCD 5, SCJP 1.4, OCA (PL/SQL)
posted 10 years ago
And what is your question?
Dolphins are grey, but they dream in colour.