public boolean equals(Object obj){...}
매개 타입 : Object로서, 모든 객체가 매개 값으로 대입이 가능
리턴 타입 : boolean 타입. 같다면 true, 아니라면 false를 리턴한다.
@Override
public boolean equals(Object o) {
// default equals 메소드
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
// 클래스에서 나온 인스턴스 필드 멤버 값비교 : 값이 같으면 주소가 달라도 true 리턴
ObjectTest that = (ObjectTest) o;
return Objects.equals(main, that.main) && Objects.equals(address, that.address);
}