The nested class can be declared ___________________

The nested class can be declared ___________________
A. Public
B. Private
C. Protected
D. Public, Protected, Private or Package private
 
Answer: d
Explanation: The nested class can be declared with any specifier, unlike the outer classes which can only be declared public or package private. This is flexibility given for the nested class being a member of enclosing class.
 

Tìm kiếm

Back
Top