In Java, char type variable can store a Chinese characters, and why?

  char type variable is used to store the Unicode characters, Unicode coded character set contains characters, so, of course, char type variable characters can be stored in it. However, if a special unicode characters not included in the coded character set, then the char type variable can not store the special characters. Description: unicode encoding occupies two bytes, therefore, char type variable is occupies two bytes.
  

 

Guess you like

Origin www.cnblogs.com/mzmy/p/11201020.html