Computer Applications
The method to convert a String to double is:
- String.toDouble()
- Double.Parsedouble()
- Double.parseDouble(String)
- Double.parseDouble()
Java Library Classes
1 Like
Answer
Double.parseDouble(String)
Reason — The method parseDouble in the Double class is used to convert a String representing a numeric value into a primitive double type.
Answered By
1 Like
Related Questions
Conversion of a wrapper class to its corresponding primitive type is known as :
- unboxing
- autoboxing
- type casting
- parsing
The String method, which results only in a positive integer, is :
- indexOf
- lastIndexOf
- compareTo
- length
The java statement System.out.println(x[x.length]) results in:
- logical error
- syntax error
- run time error
- no error
Which of the following is a valid array declaration statement to store the Gender of 80 employees [ 'M'-male, 'F'-female, 'T'-transgender ]?
- char gender = new char[80];
- char gender[] = new char[80];
- char gender[80];
- char gender[80] = new char[ ];