Multiple choice general knowledge

What modifiers may be used with an inner class that is a member of an outer class?

  1. public, protected

  2. private, static, final

  3. abstract

  4. all the above

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

Inner classes are class members and can use all modifiers: access modifiers (public, protected, private) and non-access modifiers (static, final, abstract). Therefore all options A, B, and C are valid.