ICSE Class 10 Computer Applications
Question 20 of 30
Solved Sample Paper 4 — Question 20
Back to all questions 20
Question Question 1(xx)
State the data type after the following is executed :
char ch = '9';
res = Character.isDigit(ch);- int
- char
- string
- boolean
boolean
Reason — isDigit() method returns true if the specified character is a digit; returns false otherwise. Thus, the return type is boolean.