Question: how to check null and empty list in java?
Answer: Checking empty list. isEmpty() method of CollectionUtils can be used to check if a list is empty without worrying about null list. So null check is not required to be placed everywhere before checking the size of the list.