Java tutorial
//package com.java2s; import java.util.Collection; public class Main { /** * Method to verify if a collection is empty (including null). * * @param col a {@link java.util.Collection} object. * @return a boolean. */ public static boolean isEmpty(Collection col) { return (col == null || col.isEmpty()); } }