3:53 pm - Monday March 25, 8695

Double Example Program for isNaN(double v)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
*Double Example Program for IsNaN()
* @author: candidjava.com
* This method Returns true if this Double value is a Not-a-Number (NaN), false otherwise.
*/

public class IsNaN
{
public static void main(String args[])
{

//Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.

boolean b1 = Double.isNaN((double)(-1.0 / 0.0));
System.out.println(b1);

}
}

Output:
false

Filed in: Z-A All Java Codes

Comments are closed.