Card 60 / 76: What access modifier, if any, should be used on all instance variables unless there is a particular reason not to use it?
A)
public
B)
private
C)
protected
D)
package-private (default)
Answer:
B) private
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
A, C, and D are incorrect.
All of these access modifiers, including the default access level, are less restrictive than private.
|