Skip to content

Instantly share code, notes, and snippets.

@LeoHeo
Created June 10, 2018 04:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save LeoHeo/25bbdfd7197589879e64c44fc8ed8786 to your computer and use it in GitHub Desktop.
Set<Student> studentSet = new HashSet<>();
studentSet.add(leo1);
studentSet.add(new Student(1L, "Leo"));
System.out.println("studentSet size => " + studentSet.size()); // studentSet size => 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment