[Solved] I am new to programming and I can’t tell if this error is occurring because of my syntax
You are using equals method with your custom object Student. You need to override it in your Student class. In your case, if you want to match all fields of s1 to s2, your implementation should go like this: //Overriding equals public boolean equals(Object obj) { if (this == obj) return true; if (obj == … Read more