Why character datatype stores 2 bytes in memory in Java? Explain your answer.
Answers
Answered by
1
Answer:
16 bit
Explanation:
The ‘char’ data type in Java originally used for representing 16-bit Unicode. Therefore the size of the char data type in Java is 2 byte, and same for the C language is 1 byte. Hence Java uses Unicode standard.
Answered by
1
Answer:
Java was designed for using Unicode Transformed Format (UTF)-16, when the UTF-16 was designed. The 'char' data type in Java originally used for representing 16-bit Unicode. Therefore the size of the char data type in Java is 2 byte, and same for the C language is 1 byte. Hence Java uses Unicode standard.
Explanation:
make me brilliantlist
Similar questions