A simple solution to check if a list is empty in Java is to use List’s isEmpty() method. It returns true if the list contains no elements. To avoid NullPointerException , precede the isEmpty method call with a null check.