An inner class is declared inside (between the opening and closing curly braces).
class MyClass{
class MyInnerClass{
}
}
A normal Java class can have another class declared inside it: a member of the normal class.
Member classes cannot have the same name as the enclosing class.
If the class is declared static, it is called a nested class and can access only static methods and variables.
Inner classes can be named or anonymous.
For a local inner class (inside a method) to use local variables or method parameters,
it must be declared final.