5 years ago in Java Operators

What is the output of the program ?
class Test 

{

public static void main(String [] args)

{

int x=20;

String sup = (x < 15) ? "small" : (x < 22)? "tiny" : "huge";

System.out.println(sup);

}

}

[A] small
[B] tiny
[C] huge
[D] compilaton fails
Loading...
Next Question

Overall Stats

Attempted 220
Correct 93
Incorrect 42
Viewed 85

Answers

Guest
Guest
Umayal Nachiappan
Umayal Nachiappan - 3 weeks ago

Umayal Nachiappan from Chennai, India is saying compilaton fails is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying tiny is correct answer

Cos Sinus
Cos Sinus - 1 month ago

Cos Sinus from Casablanca, Morocco is saying tiny is correct answer

Awa Kone
Awa Kone - 1 month ago

Awa Kone from Berrechid, Morocco is saying tiny is correct answer

Zo Go
Zo Go - 1 month ago

Zo Go from Casablanca, Morocco is saying tiny is correct answer

Related Questions

Which of these is returned by greater than, <, and equal to, ==, operator?

  • [A] Integers
  • [B] Floating - point numbers
  • [C] Boolean
  • [D] None of the mentioned

Which of the following can be operands of arithmetic operators?

  • [A] Numeric
  • [B] Boolean
  • [C] Characters
  • [D] Both Boolean & Characters