這樣通過了
public class HelloWorld {
? ? public static void main(String[] args) {
int score = 94;
String sex = "女";
? ? ? ? if (score>80){
? ? ? ? ? ? if (sex=="女")
? ? ? ? ? ? ? ? System.out.println("進入女子組決賽");
? ? ? ? ? ? else
? ? ? ? ? ? ? ? System.out.println("進入男子組決賽");
? ? ? ? }
}
}
2018-05-18
嘛,就看判斷條件來,實現(xiàn)目標的寫法算是多種多樣了