我对这段代码有疑问:
PointerCoords[][]srodki = new PointerCoords[n2][];
for(int i = 0; i < n2; i++)
{
srodki[i] = new PointerCoords[n2];
}
for(int i = 0; i < n2; i++)
{
for(int j = 0; j < n2; j++)
{
srodki[i][j].y = r + j*k;
srodki[i][j].x = r + i*k;
}
}
为什么我会收到 NullPointerException?