7, char type variable can store a Chinese characters? Why?

To be able to define when a Chinese CHAR type variable, because the java coding to unicode, a char accounting for 16 bytes, so put a Chinese is no problem

char type variable is used to store the Unicode characters, Unicode coded character set contains characters,

Therefore, char type variable characters may of course be stored in it. However, if a special unicode characters not included in the coded character set,

Well, the char type variable can not store the special characters.

Supplement: unicode encoding occupies two bytes, therefore, char type variable is occupies two bytes

Guess you like

Origin www.cnblogs.com/helenwq/p/11648341.html