check if list of strings is empty or null java 8 code example Example: how to check if a list is empty java if (list != null && !list.isEmpty()) { do something }