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.
- Become CIW Master CIW Enterprise Developer certified.
- Click here to download scbcd test study guide and practice question.
- Get certified in first attempt download scdjws - SCDJWS simulation.
- Download practice question and study guide for scjp for exam.
- Click here to download scjp-5-0 test study guide and practice question.
- Click here to download scmad test study guide and practice question.
- Download free practice test for SUN SCWCD exam.
- Get certified in first attempt download 310-035 - SCJP 2 simulation.
- Download free practice test for CX310-036 SCJP 1.4 Upgrade exam.
- Click here to get free CX310-055 Java 5.0 exam practice questions.
- Get certified in first attempt download CX310-056 - SCJP 5.0 Java Upgrade simulation.
- Click here to get free CX310-065 SCJP 6.0 exam practice questions.
- Become SUN SCJP Upgrade certified.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.