2012/08/10

Java split 字串分割


public class split {
    public static void main(String[] args) {
        String splitString = "Cheng You Feng";
        String[] names = splitString.split(" ");
        for (String name : names) {
            System.out.println(name);
        }
    }
}








參考文章:
http://cooking-java.blogspot.tw/2010/03/java-string-split.html
http://www.360doc.com/content/10/0319/17/908129_19415667.shtml