public class StringToKenizer {
public static void main(String[] args) {
String strin = "Hello Java World!!的";
System.out.println("原字符串:" + strin + "\n");
System.out.println("演示StringToKenizer获取字符串中的单词:");
StringTokenizer oo = new StringTokenizer(strin);
while (oo.hasMoreTokens()){
System.out.println(oo.nextToken());
}
}
}
posted on 2018-05-31 14:29  背起全世界の蜗牛  阅读(890)  评论(0编辑  收藏  举报