3 ms·
those cases are rare. Defensive copying should be optin, not the default. Java really deep copy objects for even the most basic instanceof checks??
by SemanticStrengh 4y ago
those cases are rare. Defensive copying should be optin, not the default.
Java really deep copy objects for even the most basic instanceof checks??
- kaba0 4y agoYou can’t change the object’s type in Java, so if you hold on to the same reference it will be safe to use after the instanceof check.