Java ArrayList Contain always return false although it contain the same value
You need to override the equals method herited from the Object class (and hence also hashCode to respect the contract, see Why do I need to override the equals and hashCode methods in Java? ) in your Hole class. Returns true if this list contains the specified element. More formally, returns true if and only … Read more