Java tutorial
//package com.java2s; import java.util.Collection; public class Main { public static boolean isEmpty(Object[] arr) { return arr == null || arr.length == 0; } public static boolean isEmpty(Collection set) { return set == null || set.isEmpty(); } }