public class Demo1 {
public static void main(String[] args) {
int b=20;
int a=10;
int c=30;
if (a > b) {
if (a > c) {
System.out.println(a);
}else {
System.out.println(c);
}
}else { //(a < b)
if (b > c) {
System.out.println(b);
}else {
System.out.println(c);
}
}
}
}
应该是你的{}没写好,程序是对的 |