public class day_2_3 {标签:java,int,System,else,运算符,条件,println,out From: https://www.cnblogs.com/wyj497022944/p/18051337
public static void main(String[] args) {
/*
if语句
*/
int i = 1;
int j = 1;
//三元运算
int max = i > 2 ? i : 2;
// if表达式
if (i > j) {
System.out.println(i);
}
System.out.println(j);
//if及else语句
if (i > j) {
System.out.println("java");
} else {
System.out.println("Python");
}
System.out.println(max);
// if,else if,else语句
if (i < j) {
System.out.println("java");
} else if (i > j) {
System.out.println("java");
} else {
System.out.println("Python");
}
}
}