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]