public class Main { public static void main(String[] argv) { byte[] b = "ada".getBytes(); for (int i = 0; i < b.length; i++) { System.out.println(Integer.toString((b[i] & 0xff) + 0x100, 16).substring(1)); } } } /* 61 64 61 */