char ch = '9'; res= Character.isDigit(ch);
44 Likes
Data type of res is boolean as return type of method Character.isDigit() is boolean. Its value is true as '9' is a digit.
Answered By
23 Likes
The method to convert a String to double is:
String s1 = "45.50"; String s2 = "54.50"; double d1=Double.parseDouble(s1); double d2=Double.parseDouble(s2); int x= (int)(d1+d2);
What is value of x?