🌐
Salesforce Developers
developer.salesforce.com › docs › atlas.en-us.apexcode.meta › apexcode › langCon_apex_NullCoalescingOperator.htm
Null Coalescing Operator | Apex Developer Guide | Salesforce Developers
The ?? operator returns its right-hand side operand when its left-hand side operand is null. Similar to the safe navigation operator (?.), the null coalescing operator (??) replaces verbose and explicit checks for null references in code.
🌐
Apex Hours
apexhours.com › home › salesforce release notes › using null coalescing operator
Using Null Coalescing Operator - Apex Hours
March 21, 2024 - So far so good, but is there any other way that I can make this shorter without disturbing the functionality? The answer to this question is Yes. But before going into that, you need to learn about the awesome feature that came with the Sprint 24 release, which is the Null Coalescing operator.
🌐
SFDC Lessons
sfdclesson.com › home › simplify null checks in apex with new ?? null coalescing operator
Simplify Null Checks in Apex with New ?? Null Coalescing Operator
March 7, 2024 - Salesforce's Spring '24 release introduces the null coalescing operator (??) to simplify handling null values in Apex code. It condenses conditional checks and default values, improves readability, and aids in assigning defaults safely and concisely.
🌐
Reddit
reddit.com › r/salesforce › simplify null checks in apex with new ?? null coalescing operator
r/salesforce on Reddit: Simplify Null Checks in Apex with New ?? Null Coalescing Operator
November 15, 2023 -

Salesforce's Spring '24 release introduces the null coalescing operator (??) to simplify handling null values in Apex code. It condenses conditional checks and default values, improves readability, and aids in assigning defaults safely and concisely.

https://sfdclesson.com/2023/12/21/simplify-null-checks-in-apex-with-new-null-coalescing-operator/

🌐
Medium
medium.com › @mukesh.palsftech › null-coalescing-operator-in-salesforce-apex-024448694b4f
Null Coalescing Operator in Salesforce Apex | by Mukesh Pal | Medium
September 9, 2024 - The Null Coalescing Operator (??) in Apex provides a way to return the first non-null value from a list of expressions. It’s useful for…
🌐
Medium
mrriyas.com › salesforce-null-coalescing-operator-in-apex-spring24-b39113a478b6
Salesforce: Null Coalescing Operator (??) in Apex (Spring’24) | by Mr. Riyas | Medium
March 13, 2024 - String firstText = null; /* . // you may have some logic in the code that may set or not set this value . . .//later in the code, using null coalescing operator */ String returnText = firstText ??'Grand'; //or whatever you want to return in case firstText is blank or null.
🌐
GitHub
github.com › pmd › pmd › issues › 4828
[apex] Support null coalescing operator ?? (apex 60) · Issue #4828 · pmd/pmd
November 11, 2023 - Is your feature request related to a problem? Please describe. I am currently in the process of updating my Apex codebase to version 60, and I've introduced the use of the null coalescing operator ??, which is a new feature in Apex v60. ...
Published   Feb 19, 2024
🌐
Blogger
bobbuzzard.blogspot.com › 2024 › 02 › apex-null-coalescing-operator.html
Bob Buzzard Blog: Apex Null Coalescing Operator
When the expressions is evaluated, if operand 1 is not null that will be the result, otherwise operand2 will be the result. Note that this isn't a mechanism for avoiding a null result, as if operand1 is null, operand2 will be the result even if it is null. The key use case for the null coalescing operator is removing explicit, and possibly lengthy, null checks.
Find elsewhere
🌐
Inno Valley Works
innovalleyworks.com › home › blog › null coalescing operator on apex in salesforce
Null Coalescing Operator on Apex in Salesforce
July 30, 2025 - The null coalescing operator (A ?? B) is a binary operator that yields A if A is not null and B otherwise. The operator is left associative. The left-hand operand is evaluated only once.
🌐
Salesforce Geek
salesforcegeek.in › home › blog › null coalescing operator in salesforce
Null Coalescing Operator in Salesforce - Salesforce Geek
March 3, 2024 - 1. What is a safe navigation operator? It displays as ?. For example: a?.b which means if a is not null then a.b gets evaluated otherwise it will return null. For Example: Below is BillingCity of the first account in the acts list is null return null else return BillingCity in uppercase. Syntax · OUTPUT · 2. How does null coalescing work with SOQL? OUTPUT · Also Read – Batch Apex Scenario-Based Interview Questions and Answers ·
🌐
YouTube
youtube.com › watch
Null Coalescing Operator (??) in Apex | Spring 24 | Salesforce - YouTube
In this video, we will see what is Null Coalescing Operator (??) and how we can use it in Apex.LWC Hands-on Project 1 | Add Multiple Recordshttps://youtu.be/...
Published   December 26, 2023
🌐
GitHub
github.com › forcedotcom › sfdx-scanner › issues › 1380
[apex] Support null coalescing operator ?? (apex 60) · Issue #1380 ...
December 18, 2023 - Yes, this is new operator supported on apex 60 I am currently in the process of updating my Apex codebase to version 60, and I've introduced the use of the null coalescing operator ??, which is a new feature in Apex v60.
Published   Mar 07, 2024
🌐
Asagarwal
asagarwal.com › home › #salesforcespring24 – introducing null coalescing operator in apex
#SalesforceSpring24 - Introducing Null Coalescing Operator in Apex
February 26, 2024 - Similar to the safe navigation operator (?.), the null coalescing operator (??) replaces verbose and explicit checks for null references in code.
🌐
SFDC Developers
sfdcdevelopers.com › sfdc developers › salesforce tips › apex null coalescing operator (spring ’24)
Apex Null Coalescing Operator (Spring '24) » SFDC Developers
September 20, 2025 - The Spring ’24 release of Salesforce introduced the null coalescing operator to Apex: the double question mark (??).
🌐
YouTube
youtube.com › watch
Optimize your Apex Code with the new Null Coalescing ...
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.