View RSS Feed

Java Object

Object-oriented programming in Java.

  1. Static Nested Classes

    by , 04-26-2012 at 05:58 PM
    A static nested class also has a link with the outer class just the same way with class methods & variables. Just like static class methods, it is not possible for the static nested class to directly refer to the instance variables which have been defined in the enclosing class. This means that they can be used just via object reference.

    Static nested classes can be accessed by the enclosing class name:
    Java Code:
    OuterClass.StaticNestedClass
    E.g, Syntax is ...
    Categories
    Tutorial