I have a huge sized java list object as follows :
List<Object[]> res = // repo method that will return query result
I have to remove nulls from the res object.
I tried below methods so far but nothing seemed to work:
1. res.remove(null);
2. res.removeAll(Collections.singleton(null));
3. res.removeAll(null);
4. while(res.remove(null));
How can I remove nulls efficiently as the list size is going to be huge?