What is the numerical range of a char?

Asked 7 years ago
Viewed 678 times

1

What is the numerical range of a char?


0 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!


answered 7 years ago by Anonymous User
  1. Thanks for answering. - Anonymous User 5 years ago

Your Answer