Here you can find the source of containsKey(Dictionary dict, String key)
Parameter | Description |
---|---|
dict | a parameter |
key | a parameter |
public static boolean containsKey(Dictionary dict, String key)
//package com.java2s; import java.util.Dictionary; public class Main { /**/* w w w . j av a2 s. c o m*/ * @param dict * @param key * @return true if dictionary contains key, false otherwise. */ public static boolean containsKey(Dictionary dict, String key) { if (dict == null || key == null) { return false; } return dict.get(key) != null; } }