Question: Given the following class, what should be inserted into the two blanks to ensure the class data is properly encapsulated? A. private and getStuff B.
Given the following class, what should be inserted into the two blanks to ensure the class data is properly encapsulated?

A. private and getStuff
B. private and isStuff
C. public and getStuff
D. public and isStuff
E. None of the above
package storage; public class Box { } public String stuff; } String return stuff; } _() { public void setStuff (String stuff) { this.stuff stuff;
Step by Step Solution
3.46 Rating (162 Votes )
There are 3 Steps involved in it
In the class provided to ensure proper encapsulation of the class data the ... View full answer
Get step-by-step solutions from verified subject matter experts
