简单数组问题
public void split(StringBuffer sb) {
String str = sb.toString();
String subStr = str.substring(str.indexOf("!") + 1, str.length());
String[] outStr = subStr.split("!");
for (int i = 0; i < outStr.length - 1; i ++) {
//System.out.println(outStr[i]);
String[] innerStr = outStr[i].split("#");
System.out.println(Arrays.toString(innerStr));
}
}
请问怎么获得innerStr的每个元素。
------解决方案--------------------
Java code
for(int i=0;i<innerStr.length;i++)
{
System.out.println(innerStr[i]);
}