Page 160 - Cs_withBlue_J_C11_Flipbook
P. 160

false|| false
              Ans.  false
                5.  n>(m*10);
                    200 > 1000
              Ans.  false
                6.  m<n;
                    100<200
              Ans.  false
                7.  (m<n) || (m==n);
                    (100<200) || (100==200)
                    true||false
              Ans.  true
                8.  (m<n) && (m==n);
                    (100<200) && (100==200)
                    true&&false
              Ans.  false
                9.  (m+n)<=(m*n);
                    300<=20000

              Ans.  true
                10.  (m*m == n*2)
                    10000== 400
              Ans.  false



                              Let’s Revisit


                     ♦ Operators are used for doing calculations.
                     ♦ There are many types of operators. They are Arithmetic operators, Assignment operators, Shorthand Operators, Relational
                   Operators, Logical Operators, Bitwise Operators and Shift Operators.
                     ♦ There are different types of unary operators. They are Unary (+), Unary (-), Unary increment (++) and Unary decrement (--).
                     ♦ Prefix Unary Operator executes on the principle of “Change Before Action”.

                     ♦ Postfix Unary Operator executes on the principle of “Change After Action”.
                     ♦ Shorthand Operator is a special compound assignment operator.
                     ♦ Relational Operators compare two variables or expressions and result in true or false. There are six types of relational
                   operators. (>, >=, <, <=, ==, !=)

                     ♦ Logical Operator is used to check whether an expression results in true or false. There are three types of logical operators.
                     ♦ Conditional Assignment Operator or Ternary Operator consists of three operands which can be a variable, an expression or a
                   constant. It is also known as Ternary Operator. (?, :)

                     ♦ When a conditional assignment operator is used under another is known as a nested conditional operator.
                     ♦ Bitwise Operator performs bit-level calculations on the operands of data types - byte, short, int and long.
                     ♦ Shift Operator is used to shift bits of the first operand to right or left one by one thus performing bit manipulation on data.
                   There are three types of Shift Operators in Java.







                158158  Touchpad Computer Science-XI
   155   156   157   158   159   160   161   162   163   164   165