public class FloatToInt { public static void main(String[] args) { int x; x = (int) 3.14; // x = 3 x = (int) 6.99; // x = 6 } }