DefinitionEasy2 marks
What is an operator? Name any two types of operators used in Java.
Topic: Operators
Previous-year question practice database
Answer
Exam answer
An operator is a symbol that performs an operation on one or more values (operands) and produces a result. For example, in a + b the symbol + is an operator and a and b are its operands.
Two types: arithmetic operators (+, -, *, /, %) and relational operators (<, >, <=, >=, ==, !=).
Explanation
Answer in two parts: the definition, then two named types with examples. Any two of these are acceptable — arithmetic, relational, logical (&&, | | , !), assignment (=, +=), unary (++, --), ternary (? :), bitwise. Naming the type without giving symbols usually costs half the mark, so always add an example or two.
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