Explain the following with one example. Relational operator
Advertisements
प्रश्न
Explain the following with one example.
Relational operator
Give two examples of Relational operators.
लघु उत्तरीय
Advertisements
उत्तर
These operators represent the relationship between operands. Relational operators (<, <=, >, >=, ==, !=) compare variables and return 'True' or 'False'.
Example:
if( a == b) System.out.println("Equal");shaalaa.com
Notes
Students should refer to the answer according to their questions and preferred marks.
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1.04: Operators in Java - EXERCISES [पृष्ठ ४४]
