Which access specifier is used when no access specifier is used with a member of class (java)?

Which access specifier is used when no access specifier is used with a member of class (java)?
A. Private
B. Default
C. Protected
D. Public
 
Answer: b
Explanation: Default access is used if the programmer doesn’t specify the specifier. This acts in a similar way as that of private. But since nothing is specified we call it to default access.
 

Tìm kiếm

Back
Top