Posts

Showing posts from February, 2018
  STATIC INNER CLASS   whenever any class is defined inside the scope of another class using 'static' keyword then it is class static inner class. #  how call inner class  OuterClassName.InnerClassName #  following characteristics   are:   1) It can be  instantiated independently means  object of outer class is not required for           instantiation of static inner class.   OuterClassName ref = new OuterClassName()     2) It can directly used the reference of  priavte  static member of its outer class.    class Outer {   priavte static int  a=10;   class Inner {   public void display() {   System.out.println("access value of a"+a);// private member of class call in inner class } } ---------------------------------------------------------------------------------   JRE MAKE FOLLOWING CHANGE   1)...
NESTED CLASS    Nested class are those class which define inside the scope of another class like  class Outer {    //data member if any  // method if any    class Inner  {   // data member if any   // method if   any  } } 2 tyep of nested classes  i) static nested class  ii) non-static nested class