KnowledgeBoat Logo
|

Computer Applications

Ternary operator is a:

  1. logical operator
  2. arithmetic operator
  3. relational operator
  4. conditional operator

Java Operators

ICSE Sp 2024

39 Likes

Answer

conditional operator

Reason — Ternary operator is a conditional operator as it evaluates the given condition. Its syntax is as follows:

condition? expression 1 : expression 2

If the condition is true then result of ternary operator is the value of expression 1. Otherwise the result is the value of expression 2.

Answered By

22 Likes


Related Questions