Flashcard 1
Q: What is a Java operator?
A: A Java operator is a special symbol applied to variables, values, or literals,
returning a result.
Flashcard 2
Q: What are binary arithmetic operators in Java?
A: Operators like +, -, *, /, and % that operate on two operands and follow order of
precedence.
Flashcard 3
Q: Which operators can be applied to String values in Java?
A: Only the addition operators + and +=, which result in String concatenation.
Flashcard 4
Q: Describe the modulus (%) operator.
A: It gives the remainder when two numbers are divided.
Flashcard 5
Q: What is the logical complement operator in Java?
A: The ! operator, which inverts a boolean expression (true becomes false, and vice
versa).
Flashcard 6
Q: Explain the increment (++) and decrement (--) operators.
A: These operators modify numeric operands, applying first if they appear before the
operand (pre-increment/decrement) or last if after (post-increment/decrement).
Flashcard 7
Q: What is an assignment operator in Java?
A: A binary operator that assigns the value on the right to the variable on the left.
Flashcard 8
Q: What are compound assignment operators?
A: Operators that perform an operation and assign the result in a shorter form, e.g.,
+=, -=, *=, /=, %=.
Flashcard 9
Q: What do relational operators do?
A: They compare two expressions and return a boolean value.
Flashcard 10
Q: What is numeric promotion?
A: Java's automatic type conversion to the larger data type in mixed-type expressions.