A named inner class that is declared within the body of a method is called a local class. A local class is not a member of any class. An inner class declared inside a method is private to the method. Therefore, it can neither be marked with an access modifier (public, private, or protected) nor with the static modifier.
A local class can access only those local variables or parameters in its enclosing method that are declared final. However, it can freely access any other variables (i.e., instance variables or static variables) in its enclosing class.
- Download free practice test for CIW Master CIW Enterprise Developer exam.
- Become SUN SCBCD certified.
- Download free practice test for scdjws SCDJWS exam.
- Download free practice test for SUN SCJP exam.
- Best exam simulation SUN scjp-5-0 download free trial.
- Pass SUN scmad - SCMAD
- Click here to get free scwcd SCWCD exam practice questions.
- Download free practice test for 310-035 SCJP 2 exam.
- Download free practice test for SUN SCJP 1.4 Upgrade exam.
- Become SUN Java 5.0 certified.
- Pass SCJP 5.0 Java Upgrade in first attampt.
- Click here to get free CX310-065 SCJP 6.0 exam practice questions.
- Get certified in first attempt download CX310-066 - SCJP Upgrade simulation.