Therefore, the declaration of method local inner class cannot use any access modifiers such as public, protected, private, and non-access modifiers such as static . Method local inner class in Java can also be declared inside the constructor, static initializers, and non-static initializers.