← 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?
- A.&&
- B.? :
- C.::
- 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 →