Short answerEasy2 marks
Name the operators listed below: (i) < (ii) ++ (iii) && (iv) ?:
Topic: Naming operators
Previous-year question practice database
Answer
Exam answer
(i) Less than — a relational operator (ii) Increment — a unary operator (iii) Logical AND — a logical operator (iv) Conditional or ternary operator
Explanation
Give both the name and the family for each; the family is what shows understanding. The families to know: relational - compare two values (<, >, <=, >=, ==, !=)
logical - combine conditions (&&, | | , !)
unary - act on one operand (++, --, !, unary minus) ternary - the only three-operand operator (? :) Note that ++ is unary and && is binary — the number of operands is often the follow-up question.
More from Revision Tour I
The full form of JVM is:2026Which of the following occupies 2 bytes of storage?2026In a statement c = c + (x * d + e); which variable is an accumulator?2026Assertion (A): The result of the Java expression 3 + 7/2 is 6.
Reason (R): According to the hierarchy of operators in Java, addition is done first followed by division.2026Evaluate the Java expression:
x = a * b % (++c) + (++a) + (--b);
if a = 7, b = 8, c = 22026System.out.println('Z' + 32); will display:2025