A conditional

exercise No. 3

Q:

Add an enclosing class and a public static void main(String[] args) {...} method to the subsequent code like in the examples before. Then execute:

int a = 3,
b = 87;

if (a < b) {
  System.out.println("a is smaller than b");
} else if (b < a) {
  System.out.println("b is smaller than a");
} else {
  System.out.println("b equals a");
}

Test different values for a and b and try reaching all three branches.