Skip to main content
๐Ÿ”ฎ Output PredictionJV Java Easy+10 XP

Ternary Operator

What does this print?

Java
int x = 7;
String result = (x > 5) ? "big" : "small";
System.out.println(result);

๐Ÿ”ฎ What is the output?

Priygop - Leading Professional Development Platform | Expert Courses & Interview Prep