What have you tried? Which part of that are you stuck on? Iterating over names? Using an if statement? Something else? You can't just keep asking general questions, as they're actually much harder to...
Type: Posts; User: KevinWorkman
What have you tried? Which part of that are you stuck on? Iterating over names? Using an if statement? Something else? You can't just keep asking general questions, as they're actually much harder to...
Google is your friend for example regular expressions. But here's one that tests whether the String "cat" can be found in another String:
Pattern p = Pattern.compile(".*cat.*");
Matcher m =...
Yep. So your next step is to throw together a regular expression that matches that pattern.
That link talks about regular expressions. Basically, regular expressions tell you whether a particular pattern (like a number) can be found inside another String.
Hint- The pattern you're looking...
Recommended reading: Pattern (Java Platform SE 6)