Card 54 / 76: Which access modifier used in conjunction with getter and setter methods provides tight encapsulation?
A)
package-private
B)
private
C)
protected
D)
public
Answer:
B) private
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
excellent encapsulation.
A, C, and D are incorrect.
The package-private, protected, and public access modifiers do not provide for tight encapsulation.
|