Character size in Java vs. C

后端 未结 5 1060
旧时难觅i
旧时难觅i 2021-01-04 04:16

Why does a character in Java take twice as much space to store as a character in C?

5条回答
  •  忘掉有多难
    2021-01-04 05:00

    Java char is an UTF-16-encoded Unicode code point while C uses ASCII encoding in most of the cases.

提交回复
热议问题