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
5.0k 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
5.7k points