package bianchengjichu;
public class IfDemo {
//CTRL+SHIFT+F格式化书写代码
public static void main(String[] args) {
int x = 0;
int y = 1;
int max;
if (x > y) {
max = x;
} else {
max = y;
}
System.out.println("max ="+ max);
// if-else等价于三元运算符
int p = x > y ? x : y;
System.out.println("p ="+ p);
}
}