Java OCA OCP Practice Question 581

Question

Which of the following are true about local inner classes?

  • A. They are not associated with an instance of an outer/enclosing class.
  • B. They may access final initialized variables and parameters that are in the scope of the statement block in which the class is declared.
  • C. They may be declared public, protected, or private.
  • D. They may not implement an interface.


A and B

Note

Local inner classes may not be declared public, protected, or private.

They may implement interfaces.




PreviousNext

Related