I want to know why char ch =5; (for example) is not error ? but if I print
System.out.println(Character.isDigit(ch));
// output
false
it will be false ?
Because 5 is an integer literal that can be converted to a char. It is not the character '5' however.
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