글쓴이 :김필호 2000년 6월 20일 15:20:02
In Reply to: ASCII 코드 변환하는 방법좀 가르쳐 주세요 posted by 유비 on 2000년 6월 20일 13:46:06:
/**
* #(#) BytesToString.java
*
*
* @date 2000/06/20
* @author Kim, Pilho [phkim@cluecom.co.kr]
*/
public class BytesToString {
public static void main(String[] args) {
byte[] b = { 48, 49, 50 , 51 };
System.out.println( new String(b) );
String s = "31";
System.out.println( "" + Integer.parseInt(s, 16) );
System.out.println( "" + (char) Integer.parseInt(s, 16) );
}
}