public class A{ void set(A k){ k = null; } } A a = new A(); A b = new A(); System.out.println(a); System.out.println(b); a.set(b); System.out.println(b); The outputs: business.CharacterCard$A@61de33 business.CharacterCard$A@14318bb business.CharacterCard$A@14318bb
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)