• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Innerclass

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks sivaram
So now i understood that local inner class can access the outerclass instance variables and local final variables.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic