Online Java Compiler By
JavaTpoint.com
public class DoubleToIntExample2{ public static void main(String args[]){ Double d=new Double(10.5); int i=d.intValue(); System.out.println(i); }}
Output