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