String str = "abc";
byte[] b = str.getBytes();
for (int i = 0, size = b.length; i < size; i++)
System.out.println((char)b[i]);
byte[] b = str.getBytes();
for (int i = 0, size = b.length; i < size; i++)
System.out.println((char)b[i]);
try{ System.out.println(str.getBytes("US-ASCII"));}
catch(UnsupportedEncodingException e)
{System.out.println("the charset is not supported");}
String str = "abc";
byte[] b = str.getBytes();
for (int i = 0, size = b.length; i < size; i++)
System.out.println((char)b[i]);