class Hell { public static void main(String[] args) { Integer i = 42; String s = (i<40)?"life":(i>50)?"base":"ball"; System.out.println(s); } }
class Hell { public static void main(String[] args) { Integer i = 42; String s = (i<40)?"life":(i>50)?"base":"ball"; System.out.println(s); } } Correct Answer ball
D is correct. This is a ternary nested in a ternary with a little unboxing thrown in.Both of the ternary expressions are false.
মোঃ আরিফুল ইসলাম
Feb 20, 2025