Page 72 - CA_Blue( J )_Class10
P. 72
Let’s Revisit
® The symbols that perform calculations over the operands are known as operators.
® An operator that works with only one operand is called a unary operator.
® An operator that works with two operands is called a binary operator.
® An operator that works with three operands or expressions is called a ternary operator.
® Arithmetic operators are used to perform simple and advanced mathematical operations on the operands, which are of
primitive data types.
® Relational operators compare two variables or expressions and return a boolean value, either true or false, as the result.
® Logical operators are used to check whether an expression is true or false.
® Assignment operators are used to assign values to the operands.
® Ternary operator is also known as a conditional operator.
® The dot(.) operator is used to invoke the members of a class or a package.
® The new operator is used to create the object of a class.
® Precedence of operators means the way in which expressions will be calculated to obtain the correct result.
® Associativity tells the compiler in which direction the operators will execute.
MIND DRILL
Solved Questions
A. Tick ( ) the correct answer.
1. Which of the following operators are used to check the equality of two values?
a. ++ b. --
c. == d. =
2. In an expression, there are two parts that are ………………… and Operator.
a. Calculation b. Operand
c. Data type d. Constants
3. Which type of operators work with only one operand?
a. Unary b. Binary
c. Ternary d. Logical
4. What will be the output of the following code?
int a=3, b=4;
System.out.print((a++) + ", " + (++b));
a. 4, 5 b. 3, 4
c. 3, 5 d. 4, 4
5. What will be the output of the following code?
int a=3, b=4;
a++;
++b;
System.out.print(a+ ", " +b);
a. 4, 5 b. 3, 4
c. 3, 5 d. 4, 4
7070 Touchpad Computer Applications-X

