为什么显示不出来,难道还有那是错的?
public class HelloWorld{
public static void main(String[] args) {
int avg1=78.5;
int rise=5;
double avg2=avg1+rise;
System.out.println("考试平均分:" +avg1);
System.out.println("调整后的平均分:" +avg2);
}
}
error: possible loss of precision int avg1=78.5; ^ required: int 什么意思嘛 found: double 1 error