这是我的代码:
我收到了这个错误提示:
为什么要这些?
class test{
public static void main(String arg[]){
int a=10, b=20;
float c = 30.123;
int e = (int)c;
System.out.println(e);
}
}
我收到了这个错误提示:
test.java:6: error: possible loss of precision
float c = 30.123;
^
required: float
found: double
1 error
为什么要这些?