Advertisements
Advertisements
Questions
Explain the following with one example.
Relational operator
Give two examples of Relational operators.
Short Answer
Solution
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.
Is there an error in this question or solution?
Chapter 1.04: Operators in Java - EXERCISES [Page 44]