The following line of Java code produce error.
Even though datatypes in java are signed?
char c = -128;
Char is the one data type that isn't signed in java. Its a 16 bit unsigned integer.
Straight from the Oracle tutorial for Java datatypes.
char: Thechardata 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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With