package xinGang;
public class Day_01_02{
public static void main(String[] args) {
double heightAvg1=176.8;
int heightAvg2=(int)heightAvg1;
double a1=55.9;
int a2=(int)a1;
System.out.println(heightAvg1);
System.out.println(heightAvg2);
System.out.println("a1");
System.out.println("a2");
}
}
System.out.println("a1");
System.out.println("a2"); 是打印字符串
改成:
System.out.println(a1);
System.out.println(a2);