Created
August 28, 2015 11:24
-
-
Save jsyeo/28397ef02e4d4f3c9365 to your computer and use it in GitHub Desktop.
Equals delegate to Object class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
A a = new A(); | |
a.equals(a); | |
B b = new B(); | |
b.equals(b); | |
} | |
} | |
class A { | |
} | |
class B { | |
@Override | |
public boolean equals(Object obj) { | |
return super.equals(obj); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment