【发布时间】:2014-01-01 09:50:01
【问题描述】:
我可以将句子中的单词分开,但我不知道如何检查单词是否包含字母以外的字符。您不必发布答案,只需一些我可以阅读的材料来帮助我。
public static void main(String args [])
{
String sentance;
String word;
int index = 1;
System.out.println("Enter sentance please");
sentance = EasyIn.getString();
String[] words = sentance.split(" ");
for ( String ss : words )
{
System.out.println("Word " + index + " is " + ss);
index++;
}
}
【问题讨论】: