Java tutorial
//package com.java2s; import java.util.Collection; public class Main { public static boolean isNullOrEmpty(Collection<?> list) { return list == null || list.size() == 0; } public static <T> boolean isNullOrEmpty(T... array) { return array == null || array.length == 0; } public static boolean isNullOrEmpty(int... args) { return args == null || args.length == 0; } }