I have encountered the following problem: I have a java class with a private member like so:
private Arcs[] arcs;
This is not initialised i
Are you actually ever storing an Arcs object in arcs[i]? If not, all elements of arcs[] will be initialized to null. (Hence the NPE)
Arcs
arcs[i]
arcs[]
Do something like this:
while(condition){ // ... arcs[i] = new Arcs(); arcs[i].add(blah); // ... }
Reference: