I know this question is answered all over the internet, especially here on StackOverflow, but I think I need a more specific answer for my case.
undirectedEdge temp = edgeList.next;
The line above is getting me this error for some reason. The "next" must be null, or something? Here is the top of my undirectedEdge class:
public class undirectedEdge {
public int Ni;
public int Nj;
public int edgeCost;
public undirectedEdge next;
public undirectedEdge(int i, int j, int cost) {
Ni = i;
Nj = j;
edgeCost = cost;
next = null;
}
public undirectedEdge getNext() { return next; } . . . }
I hope I supplied enough info. Please let me know if I should include some other code. TIA!