हिंदी

Give the output of the following code. String A = "26.0", B= "74.0"; double C = Double.parseDouble(A); double D = Double.parseDouble(B); System.out.println((C+D));

Advertisements
Advertisements

प्रश्न

Give the output of the following code.

String A = "26.0", B= "74.0";

double C = Double.parseDouble(A);

double D = Double.parseDouble(B);

System.out.println((C+D));

विकल्प

  • 26

  • 74

  • 100.0

  • 2674

MCQ
Advertisements

उत्तर

100.0

Explanation:

double C = Double.parseDouble(A);
gives C as 7 4.0
double D = Double.parseDouble(B);
gives D as 24.0
C + D gives 100.0

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2021-2022 (March) Set 1
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×