Challenge 2: A Package-Private Field, Explained — Possible Solution ==================================================================== Sensor.java: package readings; public class Sensor { double lastValue; // no modifier -- package-private // Accessible from: // - any other class inside the "readings" package, e.g. a // SensorLogger class also declared "package readings;" // - NOT accessible from a class in a different package, even // a subclass of Sensor, unless that subclass is itself also // in the "readings" package // // Compared to the alternatives on this exact field: // - private double lastValue; -> only Sensor itself could // read/write it, not even another class in "readings" // - public double lastValue; -> any class anywhere, in any // package, importing Sensor, could read/write it directly } WHY THIS WORKS AS AN ANSWER ------------------------------ This states the real, exact boundary package-private draws (same package only, regardless of subclassing) and contrasts it directly against what private and public would each allow on the identical field, matching the chapter's own compare-table row for the no-modifier default.