Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
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