- Inner classes cannot be declared as static because they exist within an instance of the outer class.
- Inner class has access to the member variables and methods of the outer class, including private members.
- Inner classes can be declared as private, protected, public, or default, with their access level being the same as the outer class members.
- When creating an instance of an inner class in an outer class, you need to use an instance of the outer class to invoke the constructor.
- Inner classes can be anonymous classes used to define classes that are only needed once.
- Non-static inner classes cannot have static members or static methods, but they can include static constants.
- Inner class can implement an interface and extend other classes.
- Inner class instances can be instantiated both within a method of the outer class and outside the outer class.
- Inner classes can access instances of the outer class, but cannot access local variables of the outer class unless they are final.
- Inner classes can be directly instantiated in an outer class, as well as instantiated within a method of the outer class.
✖