package codeurjava. 트리맵;런타임:
import java.util.TreeMap;
public class TreeMapCopy {
public static void main(String a[]){
TreeMaphmap = new TreeMap ();
//키-값 추가 peers
hmap.put(1, "one");
hmap.put(2, "둘");
hmap.put(3,"셋");
hmap.put(4,"넷");
hmap.put(5,"다섯");
hmap.put(6,"여섯");
System.out.println("이전 트리맵: "+hmap);
System.out.println("빈 트리맵");
hmap.clear();
System.out.println("이후 트리맵: "+hmap);
}
}
TreeMap 이전: {1=하나, 2=둘, 3=셋, 4=넷, 5=5, 6=6}
빈 TreeMap
TreeMap 이후: {}
Please disable your ad blocker and refresh the window to use this website.