Import import java.util.HashMap; Source HashMap row = new HashMap(); row.put("first_idx","1"); if(row.containsKey("first_idx")){ /* 해당키가 존재하는가?(boolean) */ row.put("second_idx", "2"); }else{ row.put("first_idx", "1"); row.put("second_idx", "2"); }
JAVA/자주쓰는함수 2014. 2. 16. 22:02
Source String kor_str = "한글"; String[] ary = {"euc-kr","utf-8","iso-8859-1","ksc5601","x-windows-949"}; for( int i =0 ; i "+ ary[j]+ " \r\n ==> " +new String(kor_str.getBytes(ary[i]),ary[j])); } } }