Multiple choice technology programming languages

Which is true about a method-local inner class?

  1. It must be marked final.

  2. It can be marked abstract.

  3. It can be marked public.

  4. It can be marked static.

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

Method-local inner classes CAN be marked abstract - they are defined inside a method like any other class and support abstract modifiers. They cannot be static (static inner classes are only class-level) and cannot be public (only default and private access are allowed for method-local classes).