java.lang.Float.intValue()


java.lang.Float.intValue()

package com.codingdict;



import java.lang.*;



public class FloatDemo {



   public static void main(String[] args) {



      /* returns the float value represented by this object

         converted to type int */

      Float obj = new Float("22.10");

      int i = obj.intValue();

      System.out.println("Value = " + i);



      obj = new Float("5.0");

      i = obj.intValue();

      System.out.println("Value = " + i);

   }

}