相关代码 |
|
class If{ public static void main(String args[]) { int a, b, c; a = 3; b = 4; if(a < b) System.out.println("a is less than b"); if(a == b) System.out.println("this won’t be displayed"); System.out.println(); c = a - b; System.out.println("c equal to -1"); if(c >0) System.out.println("c is Positive number"); if(c < 0) System.out.println("c is negative number"); System.out.println(); } }