diff --git a/src/main/java/chapter05/morning/EasySound.java b/src/main/java/chapter05/morning/EasySound.java index 570adda..84d6aba 100644 --- a/src/main/java/chapter05/morning/EasySound.java +++ b/src/main/java/chapter05/morning/EasySound.java @@ -11,7 +11,11 @@ public class EasySound { private SourceDataLine line = null; - private byte[] audioBytes; + // audioBytes is declared immutable by the final keyword. In Java, class properties declared immutable can be + // assigned only once. Generally, this should be done as much as possible. Also, final declares the reference + // immutable; the property cannot be reassigned by the object it points to can be changed (does not apply to + // primitives). For more about the final keyword, read https://en.wikipedia.org/wiki/Final_(Java)#Final_variables. + private final byte[] audioBytes; private int numBytes; public EasySound(String fileName)