Skip to content Skip to sidebar Skip to footer

Nullpointerexception When Adding An Item To The List

Helo All, I have a problem that I am facing NullPointerException when I want to add an item to the List, as shown below: public List sortMPGListViewForNA(List

Solution 1:

You need to initialize tempMPG, tempPrice and tempRating:

tempMpg = new ArrayList<SearchResponse>();
tempPrice = new ArrayList<SearchResponse>();
tempRating = new ArrayList<SearchResponse>();

Post a Comment for "Nullpointerexception When Adding An Item To The List"