why same formula not applied in the case of char , -2n-1 to 2n-1-1?
Why same formula is not applied on char type?
@Vipin_coder,
I think you used multiple ** in your query. Can you please add a space before and after the ** . It has actually made the text go bold.
Also, maybe give an example of your query
In lecture char range is 0 to 2 **16 , i want to know formula(-2 **n-1,2 **n-1-1) which is applied on int, float , short , why not on char?? (n is total bits).
@Vipin_coder,
Char is the one data type that isn’t signed in java. Its a 16 bit unsigned integer.
The char
data type is a single 16-bit Unicode character. It has a minimum value of '\u0000'
(or 0) and a maximum value of '\uffff'
(or 65,535 inclusive).
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.