int x = 30; int y = 40; if(y>x) { System.out.print("x is greater than y"); } else { System.out.print("x is not greater than y"); }