String s = "100";
String newS = s.getBytes().toString(); //è¿ä¸ªæ¯æ²¡åæ³è½¬æ¢çã
byte[] b = s.getBytes(); //å¦ææ¯è¿æ ·çè¯ï¼å¯ä»¥ã
String result = "";
for(int i = 0; i < b.length; i++){
result += (char)b[i];
}
System.out.println(result);
温馨提示:内容为网友见解,仅供参考