java.lang.Float.byteValue()


java.lang.Float.byteValue()

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 byte */

      Float obj = new Float("10");

      byte b = obj.byteValue();

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



      obj = new Float("15.45");

      b = obj.byteValue();

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

   }

}