How can I check if a list is empty? If so, the system has to give a message saying List is empty. If not, the system has to give a message saying Li
Good practice nowadays is to use CollectionUtils from either Apache Commons or Spring Framework.
CollectionUtils.isEmpty(list))