Im writing a short program and I have a problem.
There is a problem with more details.
I have function
public CardStck from(Card card)
int pos = this.cardList.indexOf(card);
card for this example is Card(value=5, color="D")- as u see on the debugging screen Even there is that card im searching for 5(D) (diamond 5 card) in this.cardList the value of pos is -1 (not found)
Could anyone tell me where the problem is?

equals()?equals/hasCodemethod in theCardclass?Equals()in yourCardclass?