public class TestConvert { public static void main(String[] args) { int num=9; double dnum=num; int inum=(int)dnum; double num1=9.8; int num2=(int)num1; System.out.println(num2); } }
时间: 2024-10-13 09:53:54
public class TestConvert { public static void main(String[] args) { int num=9; double dnum=num; int inum=(int)dnum; double num1=9.8; int num2=(int)num1; System.out.println(num2); } }