Online Java Compiler By
JavaTpoint.com
public class IntegerFloatValueExample1 { public static void main(String[] args) { //Input Number with Integer DataType and Double DataType Integer a = new Integer(2454); Double b = new Double(86549876); //Print the Integer values as float System.out.println("Value : "+a.floatValue()); System.out.println("Value : "+b.floatValue()); } }
Output