View RSS Feed

Java Object

Object-oriented programming in Java.

  1. Inner Classes

    by , 04-26-2012 at 06:01 PM
    Inner class has a link with enclosing class instance just the way with instance methods & variables. It also has a direct access to fields and methods of the object. Because of the association of the inner class with an instance, static member cant be defined by it.

    Inner classes instances i.e. object are present in outer class instance. Let us consider these classes:
    Java Code:
    class OuterClass {
        ...
        class InnerClass {
            ...
        }
    ...
    Categories
    Tutorial