Home Uncategorized How to wrap double basic data type in double class in Java

How to wrap double basic data type in double class in Java

by admin

Except that the parent class points to the child class object… This method is shameless… Change it… Is there anything like this··

can be packaged directly through double’s valueof method, for example:
double double1 = 1.2D
Double c = Double. valueOf(double1);
the result c is a double wrapper class
note: in fact, you can also directly use double C = new double (double1); The final results are consistent.

convert string to double; Direct double D = 123.456; Just do it!!

Double d = 1.2; Just
of course, you can double D = new double (12.3)
no parse

double d = 1.2d ;

Double d1 = new Double (d) ;

Related Posts

Leave a Comment