What are the types of Inner Classes or Nested Classes ?

Discussion in 'Inner Classes' started by vbraojava, Sep 10, 2008.

  1. vbraojava

    vbraojava New Member

    There are four flavors of Inner Classes.

    1. Static Member Inner Classes
    2. Non-Static Inner Classes
    3. Local Inner Classes
    4. Anonymous Inner Classes
     
  2. sreesoft11

    sreesoft11 New Member

    plz state some examples of above classes?
     
  3. sathishkumars3

    sathishkumars3 New Member

    A class with another class is called Inner classes.Without existing outer class object there is no chance to exist inner class object.

    In java 4 types of inner classes are there
    1.Method local inner classes
    2.Static Inner classes
    3.Non-static inner classes
    4.Anonymous inner classes

    Non static inner classes means if a class declared as static then static methods are allowed without static we can not write.
    With in the method also we can declare a class that type of classes are called Method local inner classes.The scope of the Method local inner classes is with in the block only.out side the method we can not access.
    Anonymous means without using the name For Single usage you can declare that type of classes you can declare as Anonymous.
     
  4. anneroberts

    anneroberts Member

    In java 4 types of inner classes are there
    1.Method local inner classes
    2.Static Inner classes
    3.Non-static inner classes
    4.Anonymous inner classes
     

Share This Page