Kizspy | Question: 22
(Choose 1 answer)
Which of the following is an example of encapsulation in Java?
A. Creating a private field and providing public getter and setter methods
B. Creating a public field and directly accessing it from other classes
C. Creating a protected field and accessing it from subclasses only
D. Creating a default (no modifier) field and accessing it from the same package