English

Write a statement to perform the following task on a string: Convert a number stored in a string variable x to double data type. - Computer Applications

Advertisements
Advertisements

Question

Write a statement to perform the following task on a string:

Convert a number stored in a string variable x to double data type.

Code Writing

Solution

double p = Double.parseDouble(x); 
shaalaa.com
  Is there an error in this question or solution?
Chapter 4: String Handling - EXERCISES [Page 289]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 4 String Handling
EXERCISES | Q VII. 4. (ii) | Page 289
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×