日期:2014-05-20 浏览次数:20671 次
/** * */ package com.sysdynamic.test; import java.util.ArrayList; /** * @author Andy Yang * */ public class ArrayTest { static String str = ";B100101/01/2007 J200102/03/2008;"; public ArrayTest() { } public static void print() { String[] arr = str.split(";"); for (int i = 0; i < arr.length; i++) { if (arr[i].length()>0) { String subStr = arr[i]; String[] subArrs = subStr.split(" "); for (String subArr : subArrs) System.out.println(subArr); } } } public static void main(String[] args) { print(); } }