What is a reference type variable? Three types: class type, array type, and interface type
Example sample san1 = new sample → sample1 object sample san2 = new sample → sample2 object
sample san1 sample san2
If you write sample = sam1 here, sam2 disappears ↓ sample san1 = new sample → sample1 object sample san2 = new sample → sample1 object
Where san2 refers is changed to sample1
Substituting NULL means that there is no reference destination
Recommended Posts