Relational Operators
Relational operators ‘ >, >=, <, <= ‘
We have to apply these relational operators only for primitive data types except boolean.
- 10 > 20 // false
- ‘ a ‘ > 95 // true
- 10 < 10.5 // true
- true < false // ( compile time error )
We can’t apply relational operators for object references.
” narayana ” < ” narayana 123 ” ( compile time error )
**==>Nesting of relational operators is not applicable
- s.o.p ( 10 < 20 ) ; // true
- s.o.p ( 10 < 20 < 30 ) ; // invalid ( compile time error )
Hello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in the IT industry for more than 12 years. NarayanaTutorial is my web technologies blog. My specialties are Java / J2EE, Spring, Hibernate, Struts, Webservices, PHP, Oracle, MySQL, SQLServer, Web Hosting, Website Development, and IAM(ForgeRock) Specialist
I am a self-learner and passionate about training and writing. I am always trying my best to share my knowledge through my blog.