What is the numerical range of a char?

Asked 20-Nov-2017
Viewed 442 times

1

What is the numerical range of a char?


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 User 04-Apr-2019


Loading...
Ads