Java Double isFinite() method10 Nov 2024 | 1 min read The isFinite() method of Java Double class returns true if the argument passed is a finite floating-point number, otherwise returns false(in case of NaN and infinity arguments). SyntaxParametersd- This is the double-precision number to be tested. Return valueThe isFinite() method returns true when finite floating-point value is passed as argument, otherwise returns false. Example 1Output: Value returned is : false Example 2Output: Returned result = true Returned result = true Returned result = false Returned result = false Next TopicJava-double-isinfinite-method |
The hashCode() method of Java Double class returns the hash code for this Double. The result is obtained by performing exclusive OR operation on two halves of the long integer bit representation which is same as produced by the doubleToLongBits() method. Overrides The hashCode() method of class...
3 min read
The byteValue() method of Java Double class returns the value of this double as a byte after a narrowing primitive conversion. The byteValue () method of class Double overrides the byteValue () method of class Number. Syntax public byte byteValue() Return value This method returns the double value represented by...
3 min read
The min() method of Java Double class returns the double having minor value amongst two double values. The result returned is same as by invoking Math.min () method. Syntax public static double min(double a, double b) Parameters Here, a & b are the two operands to be compared. Return...
6 min read
The parseDouble method of Java Double class returns a new double value that is initialized to the value corresponding to defined String. This method executes same as valueOf() method of Float class. Syntax public static double parseDouble(String s) throws NumberFormatException Parameters s- This is the string to be parsed. Return value The parseDouble()...
3 min read
The max() method of Java Double class returns the double object having greater value amongst two double values. The result returned is same as by invoking Math.max() method. Syntax public static double max(double a, double b) Parameters Here, a & b are the two operands to be compared ...
4 min read
The doubleToRawLongBits() method of Double class returns a floating-point value according to the IEEE 754 floating-point "double format" bit layout, preserving Not-a-Number(NaN) values. Syntax public static long doubleToRawLongBits(double value) Parameters Value is the double parameter passed which is a double precision floating-point number. Return value The doubleToLongBits(double value) method...
3 min read
Java Double.compareTo() Method The compareTo() method of Double class compares two double values numerically. Syntax public int compareTo(Double anotherDouble) Parameters anotherDouble - the Double value to be compared Return value This method returns the value- Zero, if anotherDouble has same value as this Double. Positive value, if anotherDouble has a greater...
2 min read
The isNaN() method of Java Double class returns true: If the value of this Object is Not-a-Number (NaN). If the argument passed is Not-a-Number (NaN). Otherwise, the method returns false. Syntax 1.public boolean isNaN() 2.public static boolean isNaN(double v) Parameters 1.NA 2.' v ' is the double value to be tested. Return value The isNaN() method returns...
3 min read
The shortValue() method of Double class returns the value of this object as a short after narrowing the primitive values or by casting to type short. Syntax: public short shortValue() Parameters: NA Override: The shortValue() method of Double class overrides the shortValue in class Number. Return Value: The shortValue() method returns the double value...
2 min read
The doubleToLongBits() method of Java Double class returns a floating-point value according to the IEEE 754 floating-point "double format" bit layout. Syntax public static long doubleToLongBits(double value) Parameters Value is the double parameter passed which is a double precision floating-point number. Return value The doubleToLongBits(double value) method returns the bits...
3 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India