|
|
||
Andreas Schaefer's BlogJanuary 2004 ArchivesBrain Teaser #1: the same but not equalPosted by schaefa on January 15, 2004 at 09:53 PM | Permalink | Comments (21)A colleque of mine just came up with the results of a test that threw me off and it took us quite some time to figure it out. So how good, do you think, are your Java skills? The class 'ABC' does not overwrite equals() method and derives directly from java.lang.Objects and everything is pure Java. ABC a =You read right the object 'a' is the same but not equal. Does anyone knows why? Hint: accept the result of equals(). Have fun - Andy | ||
|
|