Skip to main content

Timeline for Accessing non-static nested class

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
May 15, 2014 at 12:45 vote accept GauravS
May 15, 2014 at 12:45
May 15, 2014 at 12:37 comment added GauravS My query is how can the Non Static nested class 'Inner' be accessed by outer class reference 'Outer' ('Outer.Inner'??), whereas Inner is an Instance member?
May 14, 2014 at 14:36 history edited Nathan Hughes
edited tags
S May 14, 2014 at 14:34 history suggested Daniel CC BY-SA 3.0
fixed code, added tag, clarified question as much as possible
May 14, 2014 at 14:33 comment added DwB A non-static data member can not be accessed statically. Your example; however, is of a static data member which is accessed statically.
May 14, 2014 at 14:32 review Suggested edits
S May 14, 2014 at 14:34
May 14, 2014 at 14:31 history edited DwB CC BY-SA 3.0
added 23 characters in body
May 14, 2014 at 14:30 answer added Tim B timeline score: 3
May 14, 2014 at 14:30 comment added Marco13 The field variable is static, so it can be accessed. That's basically the same concept as with a top-level class.
May 14, 2014 at 14:26 history asked GauravS CC BY-SA 3.0