classlist only returns 1 class code example
Example: class list contains class java
List<Card> hand = ...;
for(Card card : hand){
if (card instanceof AceOfDiamonds) return true;
}
List<Card> hand = ...;
for(Card card : hand){
if (card instanceof AceOfDiamonds) return true;
}