Free Salesforce Developers Tutorials >

Chapter 3 - Apex Datatypes and Operators >

Relational Operators(<,>,<=,>=)

Relational Operators(<,>,<=,>=)

What You’ll Learn

S2 Labs

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
  • == !=
  • &&
  • ||
  • += == *=
Salesforce Developer

Download Study Material

Get access to exclusive study material for Salesforce Certification and ace your exams!

Download Now

Our Salesforce Certification Courses

Hey there! Glad you made it through our Salesforce Developer Training for beginners . But wait! We've got some high-in-demand Salesforce courses for you to take your Salesforce skills to the next level, making you a desired professional in the Salesforce job market.

Post a Comment

Your email address will not be published. Required fields are marked *