Exception in thread "main" 1java.lang.NullPointerException at Y.main(Y.java:14) 这是增么了 大神们

public class Y {
public static void main(String[] args) {
int Yh [][]=new int [10][];
for(int j=0;j Yh [j]=new int[j+1];
Yh [j][0]=Yh[j][j]=1;
if(j>1) {
for(int i=1;i<Yh[j].length-1;i++) {
Yh[j][i]=Yh[j-1][i-1]+Yh[j-1][i];
}
}
for(int k=0;k<Yh.length;k++) {
for(int x=0;x<Yh[k].length;x++) {
System.out.print(" "+Yh[k][x]);
}
System.out.println(" ");
}
}

}

}

主要我没看明白你写的啥,你可以把你的代码截图贴出来

for(int j=0;j Yh [j]=new int[j+1]; 这行代码语法有问题。
其次,报错 14 行有空指针,看看 14 行的代码是否用了什么对象的 . 操作。