diogojme diogojme - 4 months ago 7
Android Question

Size of the list does not match the ones it has

I have a list with 20 elements, but it contains a null value at the 15 position, how can I remove the null value from an

List
?

Answer

I use the solution from @Lithium after some days researching

tourists.removeAll(Collections.singleton(null));

This code remove all null values from an list.