190k views
5 votes
The ____ method takes a String argument and returns its double value.

a.
parseString()

b.
returnDouble()

c.
parseInt()

d.
parseDouble()

User Dhughes
by
7.5k points

1 Answer

0 votes

Answer:

d

Step-by-step explanation:

In java you can use pareDouble(string str) to convert the string into double.

for example if you have string like this.

string str =

then you can use

double mydouble = Double.parseDouble(str);

print(mydouble); //it will print out 16.45

but if the string would not be able to be parsed into double then you will get an error.

User BlueStrat
by
8.4k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.