62,620
社区成员
发帖
与我相关
我的任务
分享
public class test {
public static void main(String args[])
{
String s="bbbbbbb111d11m22d22m33d33c444d44m55d55m66d66c777d77m88d88m99d99bbbbbbb";
s=s.replace("b", "");
s=s.replace("d", ".");
String [] temp;
temp=s.split("c");
String [][] Object;//=new String[temp.length][temp1.length];
for(int i=0;i<temp.length;i++)
{
String [] temp1;
temp1=temp[i].split("m");
for (int j =0;j<temp1.length;j++){
Object[i][j]=temp1[j];
}
}
}
}
String [] temp; // 声明
temp=s.split("c"); // 初始化[/quote]
晓得了
Object[][]的长度 不固定 怎么办呢
String [] temp; // 声明
temp=s.split("c"); // 初始化