Which implementation of the findHand() method is correct?
1) String findHand(String cardName, String hands) { for (String aHand: hands) for (String aCard: aHand) if (aCard.equals(cardName)) return aHand; return null; //not found, so return null }
2) String findHand(String cardName, String hands) { for (String aHand: hands) for (String aCard: aHand) if (aCard.equals(cardName)) return aHand; return null; //not found, so return null }
3) String findHand(String cardName, String hands) { for (String aHand: hands) for (String aCard: aHand) if (aCard.equals(cardName)) return aHand; return null; //not found,