62,628
社区成员
发帖
与我相关
我的任务
分享
byte[] buff = "我是一个兵".getBytes("Unicode");
for(byte b : buff){
System.out.print(Integer.toHexString(0xFF & b));
System.out.print(" ");
}
System.out.println();
short s = '我';
System.out.println(Integer.toHexString(0xFFFF & s));
输出:
fe ff 62 11 66 2f 4e 0 4e 2a 51 75
6211