public class Ternary { public static void main(String[] s) { int x = 4; int y = 5; int z = x * y % 2 == 0 ? -1 : 1; z = x * y % 2 == 0 ? y < x ? -1 : 0 : 1; } }