Advertisements
Advertisements
प्रश्न
Explain the following with one example.
Relational operator
Give two examples of Relational operators.
लघु उत्तर
उत्तर
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 [पृष्ठ ४४]