修改了一下:
public class lianxi03 {
public static void main(String[] args) {
double[][] d = new double[4][4]; //这里改一下
String s="12,32,22,44;45,98,23;3232,44445;43,54";
String[] sFirst=s.split(";");
for(int i=0; i<=sFirst.length-1; i++) {
String[] sSecond=sFirst[i].split(",");
for (int j=0; j<=sSecond.length-1; j++) {
d[i][j] = Double.parseDouble(sSecond[j]);
System.out.println(d[i][j]);
}
}
}
}
空指针异常,
double[][] d = null;这不赋值的