Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.*;

public class Main {
    public static <T extends Object> boolean hasComplement(Collection<T> c1, Collection<T> c2) {
        if (c1 == null || c2 == null)
            return false;
        for (T t1 : c1) {
            if (!c2.contains(t1))
                return true;
        }
        for (T t2 : c2) {
            if (!c1.contains(t2))
                return true;
        }
        return false;
    }
}