Computer Science, asked by JoyitaPurkait, 8 months ago

char ch='9';
boolean x=character.isDigit(ch);
System.out.println(x);

Answers

Answered by amruthamanisai587
1

Answer:

isDigit() will convert the character to digit and there is a change in the code you need to use 'C' in character.isDigit(); and the output will be true because the value that get stored in x is greater than zero so anything greater than zero it will be considered as true

Explanation:

Let me know if you want more explanation on this

Similar questions