// Traditional way if (20 > 18) { System.out.println("20 is greater than 18"); } // "efficient" way int time = 20; String result = (time < 18) ? "Good day." : "Good evening."; System.out.println(result);