Hi everybody,
Can anyone explains the result of this code :
public class Reference {
public static void main (
String Args [] ){
Reference t1 = new Reference ();
Reference t2 = new Reference ();
if (t1.equals(t2)){
System.out.println ("Same content");
}else{
System.out.println ("Different content");
}
}
}
the output is : Different content. I thought it would be Same content.
Thank you