Multiple choice technology architecture

Which of the following are true about local inner classes?

  1. They are not associated with any instance of an outer class

  2. They may access final initialized variables and parameters that are in the scope of the statement block in which the class is declared

  3. They may be declared public, protected or private

  4. They may not implement an interface

Reveal answer Fill a bubble to check yourself
A,B Correct answer
Explanation

Local inner classes are declared inside method blocks and are not associated with any outer class instance. They can only access final or effectively final local variables and parameters from their enclosing scope. They cannot have access modifiers (public, protected, private) and can implement interfaces.