/** * Created by xabcd on 2019/2/12. */ public class TestJava_f {public static void main(String[] args) { int a = 6, b = 5; System.out.println("a = "+a+",b = "+b); if (a>b) System.out.println("a -b = " +(a-b)); System.out.println("a*b = "+(a*b)); } }
//若是if语句要处理的语句只有要给,可省略左右大括号
结果 a = 6,b = 5 a -b = 1 a*b = 30