Page 320 - CITS_CSA_TT_Hindi
P. 320

कं  ूटर सॉ वेयर ए ीके शन - CITS



           boolean logicalAnd = p && q;

           boolean logicalOr = p || q;
           boolean logicalNot = !p;
           System.out.println(“\nLogical Operators:”);
           System.out.println(“Logical AND: “ + logicalAnd);
           System.out.println(“Logical OR: “ + logicalOr);
           System.out.println(“Logical NOT: “ + logicalNot);



           // Increment and Decrement operators
           int count = 5; count++; // Increment by 1
           int anotherCount = 10;
           anotherCount--; // Decrement by 1

           System.out.println(“\nIncrement/Decrement Operators:”);
           System.out.println(“count after increment: “ + count);
           System.out.println(“anotherCount after decrement: “ + anotherCount);
              }
           }
           आउटपुट

           अ रथमेिटक ऑपरेटर
           Sum: 15
           Difference: 5
           Product: 50
           Quotient: 2

           Remainder: 0

           असाइनम ट ऑपरेटर
           x after assignment: 8


            रलेशनल ऑपरेटर
           Is equal: false

           Is not equal: true
           Is greater: false
           Is less: true
           Logical Operators:
           Logical AND: false

           Logical OR: true
           Logical NOT: false
           इ  ीम ट/डे े म ट ऑपरेटर
           इ  ीम ट के  बाद काउंट: 6
           कमी के  बाद दू सरी काउंट: 9



                                                           308

                                  CITS : IT&ITES - कं  ूटर सॉ वेयर ए ीके शन  - पाठ 78 - 84
   315   316   317   318   319   320   321   322   323   324   325