我碰到的情况是,我在AVG1犯了一个错误,Int avg1=78.5,编译器是会报错的,所以必须用double avg1=78.5
2015-06-30
public class HelloWorld{
public static void main(String[] args) {
double avg1=78.5;
int rise=5;
double avg2 = avg1 + rise;
System.out.println("考试平均分:"+avg1);
System.out.println("调整后的平均分:"+avg2);
}
}
public static void main(String[] args) {
double avg1=78.5;
int rise=5;
double avg2 = avg1 + rise;
System.out.println("考试平均分:"+avg1);
System.out.println("调整后的平均分:"+avg2);
}
}
2015-06-30
String name="爱慕课";
char sex='男';
float num=18;
double price=120.5;
boolean isOK=true;
char sex='男';
float num=18;
double price=120.5;
boolean isOK=true;
2015-06-30