Home » Java Double isFinite() Method with Examples

Java Double isFinite() Method with Examples

by Online Tutorials Library

Java Double isFinite() method

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).

Syntax

Parameters

d- This is the double-precision number to be tested.

Return value

The isFinite() method returns true when finite floating-point value is passed as argument, otherwise returns false.

Example 1

Test it Now

Output:

Value returned is : false  

Example 2

Test it Now

Output:

Returned result = true  Returned result = true  Returned result = false  Returned result = false  

Next TopicJava Double

You may also like