मराठी

Explain the following with one example. Logical operator - Computer Applications

Advertisements
Advertisements

प्रश्न

Explain the following with one example.

Logical operator

थोडक्यात उत्तर

उत्तर

Java's logical operators (&&, ||, !) return true or false based on the outcome of expressions. 

Example:

Logical operators Symbol Example
AND &&
boolean b = (x > y) && (x > z)
OR ||
boolean p = (x <= y) || (x <= z) 
NOT !
boolean t = !(m == n)
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.04: Operators in Java - EXERCISES [पृष्ठ ४४]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 1.04 Operators in Java
EXERCISES | Q V. 3. (c) | पृष्ठ ४४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×