I can\'t seem to find the syntax needed for the for loop in this method. I am looking to iterate through the words in the string suit.
suit
EDIT: one thing t
Try splitting the string on whitespace:
String suit = cardArray.get(card); for (String word : suit.split("\\s+")){ if (word.contains("SPADES")){ suit = "SPADES"; } }