...

/

Java Wrapper Class: Double

Java Wrapper Class: Double

Get a brief introduction to Double, a Java wrapper class.

Introducing Double

The Double class is part of the java.lang package.

The Double class is a wrapper class for the primitive type double. It contains several methods to deal with double type values effectively. An object of Double class can hold a single double value.

Creating a Double object

This class has two constructors:

  • Double (double value)
  • Double (String string)

Let’s cover them one by one.

The Double (double value) constructor

This constructor constructs a new Double object that represents the specified double value.

Look at the program below.

Access this course and 1400+ top-rated courses and projects.