Java class type double

Java.lang.Double Class

The java.lang.Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type is double.

Class Declaration

Following is the declaration for java.lang.Double class −

public final class Double extends Number implements Comparable

Field

Following are the fields for java.lang.Double class −

  • static int MAX_EXPONENT − This is the maximum exponent a finite double variable may have.
  • static double MAX_VALUE − This is the constant holding the largest positive finite value of type double, (2-2- 52 )×2 1023 .
  • static int MIN_EXPONENT − This is the minimum exponent a normalized double variable may have.
  • static double MIN_NORMAL − This is the constant holding the smallest positive normal value of type double, 2 -1022 .
  • static double MIN_VALUE − This is the constant holding the smallest positive nonzero value of type double, 2 -1074 .
  • static double NaN − This is the constant holding a Not-a-Number (NaN) value of type double.
  • static double NEGATIVE_INFINITY − This is the constant holding the negative infinity of type double.
  • static double POSITIVE_INFINITY − This is the constant holding the positive infinity of type double.
  • static int SIZE − This is the number of bits used to represent a double value.
  • static Class TYPE − This is the class instance representing the primitive type double

Class constructors

This constructs a newly allocated Double object that represents the primitive double argument.

This constructs a newly allocated Double object that represents the floating-point value of type double represented by the string.

Читайте также:  Service classes in java

Class methods

This method returns the value of this Double as a byte (by casting to a byte).

This method compares the two specified double values.

This method compares the two specified double values.

This method returns a representation of the specified floating-point value according to the IEEE 754 floating-point «double format» bit layout.

This method returns a representation of the specified floating-point value according to the IEEE 754 floating-point «double format» bit layout, preserving Not-a-Number (NaN) values.

This method returns a representation of the specified floating-point value according to the IEEE 754 floating-point «double format» bit layout, preserving Not-a-Number (NaN) values.

This method compares this object against the specified object.

This method returns the float value of this Double object.

This method returns a hash code for this Double object.

This method returns the value of this Double as an int (by casting to type int).

This method returns true if this Double value is infinitely large in magnitude, false otherwise.

This method returns true if the specified number is infinitely large in magnitude, false otherwise.

This method returns true if this Double value is a Not-a-Number (NaN), false otherwise.

This method returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

This method returns the double value corresponding to a given bit representation.

This method returns the value of this Double as a long (by casting to type long).

This method returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.

This method returns the value of this Double as a short (by casting to a short).

Читайте также:  Java version последняя версия

This method returns a hexadecimal string representation of the double argument.

This method returns a string representation of this Double object.

This method returns a string representation of the double argument.

This method returns a Double instance representing the specified double value.

This method returns a Double object holding the double value represented by the argument string s.

Methods inherited

This class inherits methods from the following classes −

Источник

Оцените статью