第二个if括号里代表的是什么意思?如果我想变成家乡是河北。怎么变
也就是说equals这个词是固定格式是吗,是在、、、、、基础上的意思是吗
这个if就是在分数为80分的基础上在判断是不是男的。
要改成河北的代码如下
public class HelloWorld {
public static void main(String[] args) {
int score = 94;
String address = "河北";
if (score>80){
if (address.equals("河北")){
System.out.println("这是河北人");
}else{
System.out.println("其他地方的人");
}
}else{
System.out.println("淘汰");
}
}
}