Why is this not throwing a NullPointerException?
null assignments do not change value by globally destroying that object. That kind of behavior would lead to hard-to-track bugs and counterintuitive behavior. They only break that specific reference. For simplicity, let’s say that sample points to address 12345. This is probably not the address, and is only used to make things simple here. The … Read more