Java ArrayList - Check if list is empty
You should use method listName.isEmpty()
Good practice nowadays is to use CollectionUtils from either Apache Commons or Spring Framework.
CollectionUtils.isEmpty(list))
As simply as:
if (numbers.isEmpty()) {...}
Note that a quick look at the documentation would have given you that information.