Here you can find the source of toInt(double d)
public static int toInt(double d)
//package com.java2s; //License from project: Open Source License public class Main { /**// ww w. j a v a 2 s . com * Simple method to convert a Double object to a primitive int */ public static int toInt(double d) { return (int) d; } }