java.lang.Float.isInfinite(float v)


java.lang.Float.isInfinite(float v)

package com.codingdict;



import java.lang.*;



public class FloatDemo {



   public static void main(String[] args) {



      Float f1 = new Float(1.0/0.0);

      Float f2 = new Float(0.0/0.0);



      // returns true if positive or negative infinity, else false

      System.out.println(f1 + " = " + f1.isInfinite(f1));



      System.out.println(f2 + " = " + f2.isInfinite(f2));

   }

}