Enumeration (2) 썸네일형 리스트형 Collections 안에 다른 Collections 을 넣었을 때의 GC * Hashtable 안에 다른 Hashtable 을 넣었을 때의 GC (List 안에 Hashtable 을 넣는 것이 바람직할듯..) Hashtable ht1 = null; Hashtable ht2 = null; try{ ht1 = new Hashtable(); ht2 = new Hashtable(); ht2.put("test2","test3"); // ht2 에는 문자열인 "test3" 세팅 ht1.put("test1, ht2); // 자, ht1 에 ht2 를 넣었으니... }catch(Exception e){ }finally{ System.out.println("+++.ht1:"+ht1); // +++.ht1:{test1={test2=test3}} // 여기서는 테스트를 위한 것이지만, 실전에선 .. HashMap 과 Enumeration 를 이용한 (한글)파라미터 수집 * 프로그램 명칭 : * 프로그램 설명 : * 작업일/작업자 : --%>%>%>%>%> HashMap rmap = new HashMap(); // Input 용도. 파라미터 HashMap hm = new HashMap(); // Output 용도. jsonp 의 최후 목적물을 생성하고, 결과값을 세팅하기 위해 try 밖에 세팅 try{ Enumeration pns = request.getParameterNames(); while(pns.hasMoreElements()) { // 파라미터 세팅 String pn = Utils.get((String)pns.nextElement()); St.. 이전 1 다음