Important Java Mcq 1

Non-static member classes must have?

a. Public

b. Private

c. Default

d. Both a & b

Answer:

d. both a & b

Explanation:

Non-static member classes must have either default or public accessibility. All nested classes can declare static member classes. Methods in all nested classes can be declared static. All nested classes can be declared static.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?