public boolean equals(Object o) { if(o instanceof Person p) return Objects.equals(this.firstName,p.firstName) && Objects.equals(this.lastName,p.lastName) && this.age==p.age; return false; }
Sign in to make a reply
Astrophel