2016-12-01から1日間の記事一覧

Equals Method Overloading - Java Puzzlers Advent Calendar1日目

Equals Method Overloading import java.util.*; class Student { private int id; Student(int id) { this.id = id; } public boolean equals(Student student) { return student != null && student.id == id; } @Override public int hashCode() { return…