Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

double link list

Status
Not open for further replies.

aachen

Technical User
Dec 24, 2004
1
US
hi programmer,
I am writing a double link list. when I try to insert an item, it gives me an null pointer error when I try to run it. this is what I basically did, in the list class,
I declared GroceryItemNode newItem = new GroceryItemNode();
then I used this new object to call another class to set the values.
I put newItem.setItem(something);
then, newItem.getItem().setDescription(decription);
can somebody how to solve this null pointer error?
thank you!!(can you also put some example on the reply?)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top