hi im the same program above if i use constainsKey(),
pls c below prgm it gives me false :even though the key exists
why?
import java.util.*;
public class MyClass
{
public static void main (
String args[])
{
HashMap hm = new HashMap();
hm.put(new Integer("1"),"Tic tac toe");
hm.put(new Integer("3"),"Checkers");
hm.put(new Integer("2"),"Hockey");
hm.put(new Integer("4"),"Chess");
System.out.println(hm.containsKey("1"));
}}