Run »
public class Main { public static void main(String[] args) { double myDouble = 9.78d; int myInt = (int) myDouble; // Explicit casting: double to int System.out.println(myDouble); System.out.println(myInt); } }
9.78
9