Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {

    public static boolean isEmptyCollection(Collection<?> cols) {
        if (cols == null || cols.isEmpty()) {
            return true;
        }
        Iterator<?> ite = cols.iterator();
        while (ite.hasNext()) {
            if (ite.next() == null) {
                return true;
            }
        }
        return false;
    }
}