我不知道哪里錯了求解答
public class HelloWorld {
? ? public static void main(String[] args) {
int score = 94;
String sex = "女";
? ? ? ? if(score>80){
? ? ? ? ? ? if(sex.euals("男")){
? ? ? ? ? ? System.out.println("進入男子組");
? ? ? ? ? ? }else{
? ? ? ? ? ? System.out.println("進入女子組");
? ? ? ? ? ? }else{
? ? ? ? ? ? ? ? System.out.println("淘汰");
? ? ? ? ? ? }
? ? ? ? }
??
}
2015-03-01
看好了,是equals
2015-02-28
樓上正解
2015-02-27
或者
2015-02-27
雖然不懂java 但是看你的代碼怎么if里有2個else
2015-02-27
雖然不懂java 但是看你的代碼怎么if里有2個else