aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Innerclass 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 "Innerclass" Watch "Innerclass" New topic
Author

Innerclass

Madhu Rao
Greenhorn

Joined: Nov 10, 2000
Posts: 6
Please help me to know whether local inner class can access the variables present in the outer class.If u can plz give combinations of access to these variables.I know that it can access only the variables marked as final in the meathod scope.
but i got a doubt about the variables present outside the method but inside the outerclass.
[This message has been edited by Madhu Rao (edited December 27, 2000).]


madhusudhan
Sivaram Ghorakavi
Ranch Hand

Joined: Nov 30, 2000
Posts: 56
Toplevel
Nested Class All Modifiers Can only access can declare
static member static & non
variables static member
Inner Class -do- All Member Non-Static
(Non-Static) variables members
Local class
(Non-Static) -NO- All instance -do-
variables +
local Final
variables
Local class
(Static) -NO- only Static + static
Local Final
variables
Hope this helps.... Khalid has given fine table about this...
check it out...
BOL
Madhu Rao
Greenhorn

Joined: Nov 10, 2000
Posts: 6
Thanks sivaram
So now i understood that local inner class can access the outerclass instance variables and local final variables.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Innerclass