Skip to content

Instantly share code, notes, and snippets.

@jsyeo
Created August 28, 2015 11:24
Show Gist options
  • Save jsyeo/28397ef02e4d4f3c9365 to your computer and use it in GitHub Desktop.
Save jsyeo/28397ef02e4d4f3c9365 to your computer and use it in GitHub Desktop.
Equals delegate to Object class
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