Java All : Operators (Arithmetic-Assignment-Unary-Relational-Logical)

Using simple assignment means = operator and special variations with arithmetic operators like +=, -=, *=, /= and %= .

Understanding unary increment with post operation and pre operation example.

Use of equality check operator == and other relational operators like not equal to !=, less than < , greater than > , less than or equal to <= and greater than or equal to >= operators.

Understanding unary operator plus, minus and inversion.

Understanding the use of condition operators and (&&) and or (||)

Understanding the use of conditional ternary operator with three operands

Understanding operator precedence with simple arithmetic and unary operators.

Understanding operator precedence with comparison(relational) and logical(conditional) operators.

Understanding rules of widening type promotions from byte->short->int->long->float->double.

( As In Exam - ICSE2014 )

Operators with higher precedence are evaluated before operators with relative

( As In Exam - ICSE2015 )

Evaluate the value of n if the value of p=5, q=19

int n = (q-p) > (p

( As In Exam - ICSE2018 )

Rewrite the following using ternary operator:

if (bill>10000)

( As In Exam - ICSE2017 )

Name the operators listed below

(i) < ( ii) ++ (iii) &

( As In Exam - ICSE2017 )

Write one difference between / and % operator.

( As In Exam - ICSE2016 )

State the difference between == operator and equals() method.

( As In Exam - ICSE2016 )

Rewrite the following using ternary operator :

if(x%2 == 0)

Syste

Write output of the following program.

Prove that output of the following program would be true.

Code Sheets:12 Exam Paper Problems:7 Solved Problems:5 Quizzes:6

×