nahkampfschaf
Grünschnabel
Ich bekomme eine "java.lang.NullPointerException" wenn ich diesen Code ausführe, wieso?
Code:
public class NodeArrayTest {
public static void main(String[] args) {
int i, n=20;
Pair[] a = new Pair[n];
for (i = 0; i < n; i++)
{
a[i].a();
}
}
}
class Pair {
private int Key = 0;
private int Name = 0;
void a ()
{
}
}