hi people...was working with hashtable's....
code is as follows :
public class X{
int a;
int b;
X(int a, int b){
this.a = a;
this.b = b;
}
public static void main(String a[]){
Map map = new HashMap<X,String>();
map.put(new X(1,2),"some value");
System.out.println(map.get(new X(1,2)));
}
}
gettin o/p as null...is there any method i'm supposed to override so as to get the o/p as "some value" ??