double to int conversion code example
Example 1: convert double into integer
class DoubleToInt {
public static void main( String args[] ) {
double DoubleValue = 3.6987;
int IntValue = (int) DoubleValue;
System.out.println(DoubleValue + " is now " + IntValue);
}
}
Example 2: double to int
@SuppressWarnings("deprecation")
int Entero=new Double(345.8).intValue();