KnowledgeBoat Logo
|

Computer Applications

Which of the following converts "25" to 25.0?

  1. Double.Parsedouble("25")
  2. Double.parse("25")
  3. Double.parseDouble("25")
  4. Double.parseDouble(25)

Java Library Classes

7 Likes

Answer

Double.parseDouble("25")

Reason — In Java, the method Double.parseDouble("25") is used to convert a string containing a numeric value into a double data type. It belongs to the Double class and takes a string as an argument, returning its equivalent double value.

Answered By

3 Likes


Related Questions