What is the numerical range of a char data type in Java?

Java MCQ: What is the numerical range of a char data type in Java?

a) 0 to 32767
b) 0 to 65535
c) 0 to 256
d) 0 to 1024

Answer:

b) 0 to 65535

Explanation:

The char data type in Java is a 16-bit Unicode character. The numerical range of char is from 0 to 65535, allowing it to represent any character in the Unicode standard.

Reference links:

https://www.rameshfadatare.com/learn-java-programming/
https://www.javaguides.net/p/java-tutorial-learn-java-programming.html

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top