How to use isNaN() method with Float object in Java

1 Answer

0 votes
package javaapplication1;
  
public class JavaApplication1 {
   
    public static void main(String[] args) {
    
        float f = (float) Math.sqrt(-3);

        Float fObj = f;
        boolean b = fObj.isNaN();
        System.out.println(b);
    }
}
   
/*
      
run:
      
true
  
*/

 



answered Nov 4, 2016 by avibootz

Related questions

1 answer 209 views
1 answer 191 views
1 answer 201 views
1 answer 167 views
1 answer 161 views
1 answer 163 views
...