Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to convert a string variable into a double-precision variable in java?
How to convert a string variable into a double-precision variable in java?
Double. Parsedouble (variable of string type)

For example, the string variable A is defined as "10" and the string is converted into a double-precision variable.

I wrote it out, you can have a look, as shown below:

Extended data:

Data types owned by Javascript.

There are five basic data types: number (integer and floating point), string, null, Boolean and undefined. In addition, there is a complex data type-object, which is essentially composed of a group of unordered name-value objects. For example, the Date object is a date and time type.

A string object is a dynamic object. Before you can reference the properties and methods of an object, you need to create an instance of the object. When creating a String object variable, you can use the new operator to create it, or you can directly assign a string to the variable. For example, strval = "hello "is equivalent to strVal=new String("hello").

Double (double-precision floating-point type) is a data type used by computers. Compared with single-precision floating point number (float), double (double-precision floating point number) uses 64 bits (8 bytes) to store a floating point number.

It can represent 15 or 16 significant digits in decimal system, with negative values ranging from-1.7976E+308 to -4.246544 e-324 and positive values ranging from 4.4. 46664866

References:

Baidu Encyclopedia _ String