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.Map;

public class Main {
    public static int getLength(Collection<?> collection) {
        if (collection == null) {
            return 0;
        }

        return collection.size();
    }

    public static int getLength(Map<?, ?> map) {
        if (map == null) {
            return 0;
        }

        return map.size();
    }
}