🎴 Flashcard Mode

Mixed Programming Languages Quiz (SAS, .NET, C#, Java)

Card1 / 20
Mastered0
Review0
QuestionClick to flip

Can inner classes have static members?

AnswerClick to flip back
A
No
💡 Explanation:

In Java, inner classes are non-static nested classes associated with an instance of the outer class. Consequently, they cannot declare static members (such as static methods or fields) unless they are compile-time constant fields (static final primitives/Strings). Hence, the general answer is no.

Change Mode