Attempt to invoke interface method ‘int java.util.List.size()’ on a null object How Solve It? [duplicate]

Create your List reference with initialization as follows

List list = new ArrayList();

if you want to update existing use the following

list.clear();
list.addAll(newList);

Thats it. if not fixed post your code first.

Leave a Comment