I need to add words to a list, but only if the word starts with a letter. How do I go about writing a conditional statement to check this?
while (sc.hasNext()) {
if (sc.next.startsWith(??)
wordList.add(sc.next());
}
Aucun commentaire:
Enregistrer un commentaire