How could I go about detecting (returning true/false) whether an ArrayList contains more than one of the same element in Java?
Many thanks, Terry
Edit Forgot to mention that I am not looking to compare "Blocks" with each other but their integer values. Each "block" has an int and this is what makes them different. I find the int of a particular Block by calling a method named "getNum" (e.g. table1[0][2].getNum();
An example of a concrete class that has overridden
equals()
: