class Ky{
public static void main(String args[]){
int h,c;
System.out.println("摄氏温度 华氏温度");
for(c=0;c<=40;c+=5){
h=c*9/5+32;
System.out.println(" "+c+" "+h);
}
}
}
谁能告诉我System.out.println后面括号中式什么意思吗? 打印出来的是摄氏温度和华氏温度 可以为什么要这样写? “" "+c+" "” 这个谁跟我解释下是什么意思? “+”是连接的意思 后面的+h是打印出 华氏温度 前面的“" "+c+" "”我就不懂啦 直接写 System.out.println(c+h);不行吗?
public static void main(String args[]){
int h,c;
System.out.println("摄氏温度 华氏温度");
for(c=0;c<=40;c+=5){
h=c*9/5+32;
System.out.println(" "+c+" "+h);
}
}
}
谁能告诉我System.out.println后面括号中式什么意思吗? 打印出来的是摄氏温度和华氏温度 可以为什么要这样写? “" "+c+" "” 这个谁跟我解释下是什么意思? “+”是连接的意思 后面的+h是打印出 华氏温度 前面的“" "+c+" "”我就不懂啦 直接写 System.out.println(c+h);不行吗?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货