public class HelloWorld {
public static void main(String[] args) {
int score = 94;
String sex = "人妖";
if(score>80){
if(sex.equals("女")){
System.out.println("进入"+sex+"子组决赛");
}else if(sex.equals("男"));
System.out.println("进入"+sex+"子组决赛");
}else{
Syetem.out.println("进入人妖组决赛");
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("进入男子组决赛");}
}
}
}
// 你贴出来的这段代码空格都是全角的,要改成半角,再把花括号匹配补齐就行了,如下 public class HelloWorld { public static void main(String[] args) { int score = 94; String sex = "人妖"; if(score>80){ if(sex.equals("女")){ System.out.println("进入"+sex+"子组决赛"); }else if(sex.equals("男")){ System.out.println("进入"+sex+"子组决赛"); }else{ Syetem.out.println("进入人妖组决赛"); } } } }
public class HelloWorld {
public static void main(String[] args) {
int score = 94;
String sex = "人妖";
if(score>80){
if(sex.equals("女")){
System.out.println("进入"+sex+"子组决赛");
}else if(sex.equals("男"));
System.out.println("进入"+sex+"子组决赛");
}else{
System.out.println("进入人妖组决赛");
}
}
}