What's the size of Character(char) variable in Java? if it is based on Unicode, what 's the unicode format it is use, UTF-8, or UTF-16?
char: The char data type is a single 16-bit Unicode character. It has a minimum value of '\ ' (or 0) and a maximum value of '\' (or 65,535 inclusive).
PS Is this question worth asking? Just 5 seconds of google'ing...
Java char
为16位,并包含用于UTF-16编码的Unicode代码点的代码单元。
Character.MIN_VALUE is 0 and Character.MAX_VALUE is 65535.
Strings are UTF-16 encoded and can give you 16-bit unsigned char
or code points of type int
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.