?Java?,??????????????Unicode??:
- ??Unicode????:?Java?,???"\u"????4?16??????Unicode?????,??'A'?Unicode???A???????????????Unicode??:
char ch = 'A'; String unicode = String.format("\\ux", (int) ch); System.out.println(unicode); // ??:A
- ??Character????:Java??Character???????????Unicode???????Character??
getNumericValue
????????Unicode??,???????16????????:
char ch = 'A'; int codePoint = Character.codePointAt(new char[] {ch}, 0); String unicode = Integer.toHexString(codePoint); System.out.println(unicode); // ??:41
??????????????Unicode?????,????????????????