🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Java Control Flow: all 10 questions

Quiz: Java Control Flow · Question 5 of 10

Which operator is the ternary operator?

Which operator is the ternary operator?

  1. A.&&
  2. B.? :
  3. C.::
  4. D.->
Answer & explanation

Correct answer: ? :

condition ? valueIfTrue : valueIfFalse.

Can you get the rest right without peeking?

Take the timed Quiz: Java Control Flow quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →