aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Local class is a inner class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Local class is a inner class?" Watch "Local class is a inner class?" New topic
Author

Local class is a inner class?

Badri Sarma
Ranch Hand

Joined: Apr 01, 2003
Posts: 72
Hi
i know that local class is a inner class, what access modifiers are applied to local class.
Can we provide public,private,protected or static
Badri


Thanks<br />Badri
Srik Buddha
Greenhorn

Joined: May 03, 2003
Posts: 3
From what I understand, I think the local classes are those classes that are declared inside a method. Access modifiers are not allowed, though static is allowed.
Srik
Rory French
Ranch Hand

Joined: Apr 03, 2003
Posts: 97
A Local inner class can be declared iether abstract or final, and it may be declared strictfp. It may NOT be declared static, and may NOT be declared with any access modifiers (i.e. private, protected, public).
[ May 03, 2003: Message edited by: Rory French ]
Srik Buddha
Greenhorn

Joined: May 03, 2003
Posts: 3
U r right, Rory.
Local class cannot be declared static. My fault.
Badri Sarma
Ranch Hand

Joined: Apr 01, 2003
Posts: 72
Thanks a lot
A local class is a inner class which is declared inside the method.
It cannot have any access modifiers like public, private, protected, and static.
where in it can have abstract, final and strictfp
 
 
subject: Local class is a inner class?