All About Class Double in Java




Double class wraps up a value of primitive type double in an Object. An Object of type Double contains a single field whose type is double.

The structure of class Double is given below:

public final class java.lang.Double extends java.lang.Number{
//Member elements
public final static double MAX_VALUE;
//MAX_VALUE=1.79769313486231570 e to the power +308
public final static double MIN_VALUE;
//MIN_VALUE=4.94065645841246544 e to the power -324
public final static double NAN;
//NAN is 0 divided by 0 . Not a number
public final static double NEGATIVE_INFINITY;
//produced when a negative number is divided by 0 like -10/0
public final static double POSITIVE_INFINITY;
//produced when a positive number is divided by 0 like 10/0
//constructors
public Double(double value);
//Constructs a newly allocated Double object that represents the primitive double argument.
public Double(String str);
//Constructs a newly allocated Double object that represents the floating point value of double represented by 
//String str.The string is converted to a double value by valueOf() method.This method may throw 
//NumberFormatException if the string does not contain a parsable number.
//Methods:
public static long doubleToLongBits(double value);
public static boolean isInfinite(double value);
public static boolean isNaN((double value);
public static double longBitsToDouble((long bits);
public static String toString(double value);
public static Double valueOf(String str);
public double doubleValue();
public boolean equals(Object obj);
public float floatValue();
public int hashCode();
public int intValue();
public boolean isInfinite();
public boolean isNaN();
public long longValue();
public String toString();
}
 
All About Class Double in Java All About Class Double in Java Reviewed by Animesh Chatterjee on October 05, 2018 Rating: 5

No comments:

Powered by Blogger.