clearing or set null to objects in java
Firstly, you never set an object to null. That concept has no meaning. You can assign a value of null to a variable, but you need to distinguish between the concepts of “variable” and “object” very carefully. Once you do, your question will sort of answer itself 🙂 Now in terms of “shallow copy” vs … Read more