public class Day03_If01 { public static void main(String[] args) { /* if(条件语句){ 语句体 } */ //定义两个整形变量condition 条件 int a =10; int b =20; //a==b 是false语句 if(a == b){ //括号中的条件不成立 则不执行语句体重都代码 System.out.println("a 等于b"); } int c = 10; if (a == c){ // a等于c符合条件,则打印以下内容 System.out.println("a等于c"); } } }