Advertisements
Advertisements
Question
String sl= "45.50";String s2="54.50";
double d1=Double.parseDouble(s1);
double d2=Doub1e.parseDouble(s2);
int x=(int)(d1+d2)
What is value of x?
Short Note
Solution
double d1=45.50
double d2=54.40
int x = (int) (45.5+54.5) = 100
value of x = 100
shaalaa.com
Types of Array
Is there an error in this question or solution?