Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.Collection;

public class Main {
    /**
     * Check is a collection is empty
     */
    public static boolean isEmpty(Collection<?> cl) {
        return !isNotEmpty(cl);
    }

    /**
     * Check is a collection is not empty
     */
    public static boolean isNotEmpty(Collection<?> cl) {
        return ((cl != null) && (cl.size() > 0));
    }
}