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
Alternatively, you may also want to check by the .size() method. The list that isn't empty will have a size more than zero
if (numbers.size()>0){ //execute your code }