±Û¾´ÀÌ :±èÁø¾Æ 2000³â 6¿ù 10ÀÏ 02:44:38
ÀÌ·¸°Ô Çߴµ¥ ÀÚ²Ù null¸¸ ¶ß´Â°ÅÀÖÁÒ..ÈæÈæ
¾îÄÉÇؾßÇϳª¿ä???
import java.util.*;
class Students{
int age;
public Students(int age){
this.age=age;
}
}
public class HashClass{
public static void main(String[] args){
Hashtable table=new Hashtable();
table.put("95030000",new Students(23));
table.put("95030001",new Students(24));
table.put("95030003",new Students(25));
Integer[] keys={new Integer(95030003),new Integer(95030001)};
for(int i=0; i<keys.length; i++){
Students st=(Students)table.get(keys[i]);
System.out.println(st);
}
}
}