问答详情
源自:4-4 Java条件语句之嵌套 if

答案对不对

public class HelloWorld {

    public static void main(String[] args) {

int score = 94;

String sex = "女";

if(score>80) {

// System.out.println("进入决赛");

if(sex=="女") {

System.out.println("进入女子组决赛");

}else {

System.out.println("进入男子组决赛");

}

}else {

System.out.println("没有进入决赛");

}


}

}


提问者:宝慕林6122101 2022-02-19 18:36

个回答

  • 精慕门1575445
    2022-02-19 20:52:57

    //是注释 不要随便加上去