2个else怎么错了
int age=25;
if (age>60);{
System.out.println("老年人");
}
else if (age>=25&&age<=60);{
System.out.println("中年人");
}
else {
System.out.println("少年");
}
}
}
int age=25;
if (age>60);{
System.out.println("老年人");
}
else if (age>=25&&age<=60);{
System.out.println("中年人");
}
else {
System.out.println("少年");
}
}
}
2017-02-21
举报