Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License");

import java.util.Collection;

public class Main {
    /**
     *  Returns <code>true</code> if the passed collection is either <code>null</code>
     *  or has size 0.
     */
    public static boolean isEmpty(Collection<?> c) {
        return (c == null) ? true : (c.size() == 0);
    }
}