Relational Operators(<,>,<=,>=)
Chapter Topics
- Apex Data Types
- Integer Data Type in APEX
- Floating Point Data Type in APEX
- String Data Type in APEX
- Date Datatypes in APEX
- Time and DateTime Data Types in APEX
- Boolean Datatype in Salesforce
- ID & Blob Datatypes in APEX
- What is the Rule of Conversions in Apex?
- Enums in APEX
- sObjects in Salesforce
- Generic sObjects in Salesforce
- Collections in APEX
- Lists in APEX
- List Array Notation in APEX
- Lists Initialization in APEX
- Nested Lists in APEX
- Sets in APEX
- Sets Initialization And Methods
- Maps in APEX
- Map Initialization Methods in APEX
- Operators in Apex and Their Types
- Shorthand Operator
- Equality Operator
- Relational Operators(<,>,<=,>=)
What Are The Relational Operators?
Relational Operators are those operators which are used to compare two values or variables.
Points To Consider In Relational Operation
- If X or Y equals null and is integers, doubles, dates, or DateTime then it will return false.
- A non-null string or id value is always greater than a null value.
- If X and Y are ids then, they must reference the same value otherwise a runtime error occurs.
- If X or Y is an id and the other value is a string then the string is validated and treated as an id.
- X and Y can not be boolean.
Operator Precedence
- () {} ++ —
- -x ! +x
- */
- +-
- < > <= >= instanceOf
- == !=
- &&
- ||
- += == *=

Join our newsletter: Get daily update on Salesforce career insights & news!
Join Now!
Need more support?
Get a head start with our FREE study notes!
Learn more and get all the answers you need at zero cost. Improve your skills using our detailed notes prepared by industry experts to help you excel.