Online Java Compiler By
JavaTpoint.com
public class IntegerIntValuetExample2 { public static void main(String[] args) { // get number as float Float x = new Float(568f); // print the value as int System.out.println("Integer Value of X: "+x.intValue()); // get number as double Double y = new Double(55.76); // print the value as int System.out.println("Integer Value of Y: "+y.intValue()); } }
Output