Section 9.12 Check Point Questions3 questions
9.12.1
If a class contains only private data fields and no setter methods, is the class immutable?
9.12.2
If all the data fields in a class are private and of primitive types, and the class doesn't contain any setter methods, is the class immutable?
9.12.3
Is the following class immutable?
public class A { private int[] values; public int[] getValues() { return values; } }