top of page
ICSE Class 9 Computer Applications
4. Operators in java
 
       01  Forms of operators
                                                 

                 Unary operator (++, --)

               

                 Binary operator (+,-,*,/,%)

            

              Ternary operator ( ? : )

​

​

​

​

 02   Types of operators

 

              Arithmetic operator

•Unary operator eg. – and +

•Binary operator eg. +,-,*,/,%

•Increment/Decrement  operator eg. ++, --

               

                 Relational operator        <,>,>=,<=,==,!=

            

              Logical operator            &&, ||, !

              

              Assignment operator     =

 

               

                 increment operator        ++

            

              decrement operator        --

             

              short-hand assignment operator +=, -=, *=, /=, %=

​

03   Hierarchy of operators

        1. [] {}

         2. ++ -- ! ~ instance of

         3. new  (type) expression

         4.* / %

         5. + -

         6. < > <= >=

         7. == !=

​                 

04   new operator

     The new keyword used to allocate memory at runtime.             

                                             

              

05   dot operator

​                 .(dot) operator      Once memory of an object is allocated using new operator, you can access                                                       individual data members of an object using.   

​

06   System.out.print()/System.out.println()

​                 

                 The only difference between System.out.println() and System.out.print() method is that
                 System.out.println() throws the cursor to the next line after printing the desired result
                 whereas
                 System.out.print() method keeps the cursor on the same line.

                   

                 

​​

Anchor 3
Anchor 4
Anchor 2
Anchor 1
Anchor 5
Anchor 6
bottom of page