结果完全不一样
基础不牢,唯一的解释。
public class test{
public static void main(String[] args){
double x = 1/4;
System.out.println(x+"");
}
}
public class test{
public static void main(String[] args){
double x = (double)1/4;
System.out.println(x+"");
}
}
是变笨了还是。。。
基础不牢,唯一的解释。