public class IfTest{
public static void main(String[] args){
int a = 100;
int b = 150;
int c = 200;
//三元实现
itn temp = (a > b) ? a : b;
itn max = (temp > c) ? temp : c;
System.out.println("max:"+max);
//if语句改进
int max1;
if(a > b){
if(a > c){
max1 = a;
}else{
max1 = c;
}
}else{
if(b > c){
max1 = b;
}else{
max1 = c;
}
System.out.println("max1:"+max1);
}
}
}