private void StringTokenize(String s){ StringTokenizer st = new StringTokenizer(s.toUpperCase()); while (st.hasMoreTokens()) { outputArea.append(st.nextToken()); outputArea.append("\n"); } }
}package shiyan6;
public class shiyan6 {
/**
* @param args */
public static void main(String[] args) {
new StringTokenizeTest(); } }
运行结果是:
四、实验小结