package com.fqs.test; public class hello { public static void main(String[] args) { boolean flag=true;//立一个flag 开始走分支 真 代表能喝;假代表 不能喝 if(flag)//flag为真,能喝 System.out.print("能喝!"); else{ System.out.print("不能喝!"); } } }
package com.fqs.test; public class hello { public static void main(String[] args) { boolean flag=true;//立一个flag 开始走分支 真 代表能喝;假代表 不能喝 if(flag)//flag为真,能喝 System.out.print("能喝!"); else{ System.out.print("不能喝!"); } } }