What is the numerical range of a char?

Asked 20-Nov-2017
Viewed 581 times

1 Answer


0

What is the numerical range of a char?

As per the Unicode Character Base Scheme, a ‘char’ datatype in JAVA yields a space of 2 Bytes in a memory location.


Hence, the calculation:

2*8 = 16 bits
So,
(2^16)-1 = 65535

Thus, shows JAVA character have Unsigned Integer Value.
Fruitful information for programmers for yielding an efficient code
All The Best!



Comment
Thanks for answering. - Anonymous User04-Apr-2019