Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.Dictionary;
import java.util.Enumeration;

public class Main {
    public static final <T, K> boolean containsKey(Dictionary<T, K> collection, T key) {
        Enumeration<T> e = collection.keys();
        while (e.hasMoreElements()) {
            if (e.nextElement().equals(key)) {
                return true;
            }
        }

        return false;
    }
}