public boolean contains(Object elem)
Returns true if this list contains the specified element.
contains in interface List
contains in class AbstractCollection
elem - element whose presence in this List is to be tested.
true if the specified element is present; false otherwise.
I guess it uses == and not equals method.
I'm trying to make a cart. If the cart has the product already, I want to increase the number.
Maybe I need a static product.getInstance method...
Sometimes just typing out a question makes me think about it more.