unchecked call: adding ints to linkedlist within an array
807607Nov 5 2006 — edited Nov 5 2006Hi.
I have a array of linked lists defined like this:
private LinkedList[] graph = new LinkedList[100];
and I'm trying to add data to it like this:
graph[src].addLast(dest);
where src and dest are both ints. I get an error saying unchecked call when I try to compile. I've done some research and it appears I need to put <int> in a couple of places in the first line but I've tried everywhere and none of them seem to work!
Even when I ignore the warning, the program still fails, saying java.lang.nullPointerException... any ideas as to how I might fix these problems?
Thanks in advance for any help.