Created
March 8, 2016 15:46
-
-
Save dangnhdev/b62e9fb18e1702595b0b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Test { | |
public static void main(String[] args) { | |
Person p1 = new Person(0, "Person1"); | |
Person p2 = new Person(0, "Person2"); | |
System.out.println(p1.hashCode() == p2.hashCode()); | |
System.out.println(p2.equals(p1)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment