In this example we will show how remove empty ArrayList from a list. In the first snippet of java code, we create a list with mock data then use an Iterator to loop over the list and remove empty instances. In the second snippet using java 8, the removeIf is used passing in a predicate that checks if the list is empty. Another way to perform the same operation is to convert the collection to a stream and filter empty elements.