/*
 * Created on 2005-5-13
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.chapter2;

import java.util.StringTokenizer;
import java.util.Enumeration;
/**
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class SplitString {

	public static void main(String[] args) {
		String str = "如何,分割,字符串:方法一,方法二" ;
		StringTokenizer st = new StringTokenizer(str,",:");
		while(st.hasMoreElements()){
			System.out.println(st.nextToken());
		}
	}
}
