<Ul> <Li> Member class--They are declared outside a function (hence a "member") and not declared "static". </Li> <Li> Local class--These are classes that are declared in the body of a function . They can only be referred to in the rest of the function . They can use local variables and parameters of the function, but only one that are declared "final". (This is because the local class instance must maintain a separate copy of the variable, as it may out - live the function; so as not to have the confusion of two modifiable variables with the same name in the same scope, the variable is forced to be non-modifiable .) Can be very helpful for creation a class with generic type fields, where the type variables are defined in the method . </Li> <Li> Anonymous class--These are local classes that are automatically declared and instantiated in the middle of an expression . They can only directly extend one class or implement one interface . They can specify arguments to the constructor of the superclass, but cannot otherwise have a constructor (however, this is not a limitation, since it can have an instance initializer block to perform any initialization). </Li> </Ul> <Li> Member class--They are declared outside a function (hence a "member") and not declared "static". </Li> <Li> Local class--These are classes that are declared in the body of a function . They can only be referred to in the rest of the function . They can use local variables and parameters of the function, but only one that are declared "final". (This is because the local class instance must maintain a separate copy of the variable, as it may out - live the function; so as not to have the confusion of two modifiable variables with the same name in the same scope, the variable is forced to be non-modifiable .) Can be very helpful for creation a class with generic type fields, where the type variables are defined in the method . </Li> <Li> Anonymous class--These are local classes that are automatically declared and instantiated in the middle of an expression . They can only directly extend one class or implement one interface . They can specify arguments to the constructor of the superclass, but cannot otherwise have a constructor (however, this is not a limitation, since it can have an instance initializer block to perform any initialization). </Li>

How many types of inner class in java