public class demo { public static void main(String[] args) { boolean flag1 = false; boolean flag2 = true; System.out.println("欢迎来到进击的巨人的博客"); if (flag1) { System.out.println("博主在"); } else if (flag2) { System.out.println("博主不在"); } else { System.out.println("博主忙碌中"); } System.out.println("->结束"); } }
|