Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { private static <E> boolean isEmpty(Collection<E> collection) { return (collection == null || collection.isEmpty()); } private static <E> boolean isEmpty(E[] array) { return (array == null || array.length == 0); } }