IT 114: Introduction to Java
Answers to Class 30 Ungraded Quiz
What do you call the practice of hiding the internal details of how a class works from users of that class?
encapsulation
What keyword do you use to implement data-hiding for a field?
private
Can a method throw an exception?
yes
How to you implement data-hiding for a field?
declare it
private
not
public
What methods must we create if we implement data-hiding for fields?
getters and setters