6 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

Create your Digital Resume For FREE on your name's sub domain "yourname.wcard.io". Register Here!


Overall Stats

Attempted 240
Correct 97
Incorrect 45
Viewed 98

Answers

Guest
Guest
SAI SANDESH
SAI SANDESH - 1 month ago

SAI SANDESH from Nellore, India is saying compilaton fails is correct answer

A Duttagupta
A Duttagupta - 5 months ago

A Duttagupta from Mumbai, India is saying tiny is correct answer

Anyaogu Margaret
Anyaogu Margaret - 5 months ago

Anyaogu Margaret from Lagos, Nigeria is saying small is correct answer

Youssef Aserrar
Youssef Aserrar - 7 months ago

Youssef Aserrar from Casablanca, Morocco is saying small is correct answer

Bharath
Bharath - 9 months ago

Bharath from Hyderabad, India is saying tiny is correct answer

Related Questions

What is the order of precedence (highest to lowest) of following operators?
1. &
2. ^
3. ?:

  • [A] 1 -> 2 -> 3
  • [B] 2 -> 1 -> 3
  • [C] 3 -> 2 -> 1
  • [D] 2 -> 3 -> 1