MCQ
Single Best Answer
Moderate
QGive the output of the following code:
String A = "26.0";
String B = "74.0";
double C = Double.parseDouble(A);
double D = Double.parseDouble(B);
System.out.println((C + D));
ID: #23876
ICSE Computer Application - Class X - Selection Examination - 2024-25 - MCQ - CALCUTTA PUBLIC SCHOOL
92 views
Question Info
#23876Q ID
ModerateDifficulty
ICSE Computer Application - Class X - Selection Examination - 2024-25 - MCQ - CALCUTTA PUBLIC SCHOOLTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option C
Explanation
Explanation:
Double.parseDouble()converts the string values"26.0"and"74.0"intodoublevalues.- Adding
26.0and74.0results in100.0.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic