place code here
Type: Posts; User: copeg
place code here
The linkedList in the references method is never instantiated.
IntLinkedList linkedList = null;
linkedList.add(1);//throws null pointer exception
You must instantiate the object before...
I have edited your post, but for future reference please surround your code with the
tags, without which your code is completely illegible.
Where is the exception thrown? Exceptions give line...
The variables of type IntLinkedList are not the problem, the problem is with the variables within that class and how they are declared (eg static).
You already have this method so I'm not...
All of your LinkedList variables are not instance variables, but rather class variables. eg static - when you set their value you end up changing the value for the class and not the instance. See...