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

为什么运行失败了还能过

public class HelloWorld {    public static void main(String[] args) {		int score = 94;		String sex1 = "女";        String sex2 = "男";        if(sex1.equals(>80)){            if(sex2.equals(<80)){                System.out.println("进入女子组决赛");            }else{                System.out.println("进入男子组决赛");                            }        }else{            System.out.println("失败");        }                                                                        			}}


提问者:猪无戒 2021-05-24 20:05

个回答

  • weibo_慕仙9405601
    2021-05-25 15:30:44

    不行,编译通不过