हिंदी

What is the difference between = and ==? - Computer Applications

Advertisements
Advertisements

प्रश्न

What is the difference between = and ==? 

अंतर स्पष्ट करें

उत्तर

S. No. = ==
1. Assignment (=) Equals (==)
2. This is the assignment operator. This is a relational operator.
3. Example: 
a = b;
// assigns the value of b to a
Example: 
boolean w = (a == b) 
// w = true if a and b are equal, otherwise w = false
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1.04: Operators in Java - EXERCISES [पृष्ठ ४४]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×