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 {
    public static <T> boolean containsByValue(Collection<? extends T> c, T item) {
        if (c == null || c.isEmpty())
            return false;
        for (T i : c) {
            if (i.equals(item))
                return true;
        }
        return false;
    }
}