Salesforce Apex: Underused Operators

Ben Butler
Sep 3, 2021

--

Some Apex operators seem underutilized. They are an easy way to make the code succinct, a bit cleaner, and a bit easier to maintain.

x |= y
//x = x || y
x &= y
//x = x && y
z = x?.y
//z = (x == null) ? null : x.y;

--

--

Responses (1)