我编写的代码转换double
为int
异常.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Cannot cast from Double to int
Run Code Online (Sandbox Code Playgroud)
这是我的代码
Double d = 10.9;
int i = (int)(d);
Run Code Online (Sandbox Code Playgroud)