Loading tutorials
null means in Apex, which operations tolerate it, which ones throw an exception, and how to write code that handles it deliberately. It assumes you can declare variables and write if statements in Apex. You should also know that a Salesforce field with no value comes b4 min readString type: how it behaves, how equality works, and the methods you will use most. It assumes you can declare variables, know what null means, and have run anonymous Apex in the Developer Console or an IDE.4 min readDate, Time, and Datetime. This chapter assumes you know how to declare variables and call methods on them, and that you have seen null handling from earlier chapters. The main skill here is knowing which of the three types fits a value, and where time3 min readnull (covered earlier). You can run every snippet as anonymous Apex in the Developer Console. The one snippet that queries data needs an org with Account records.4 min readList, Set, and Map collections from earlier chapters. It also assumes you have used Anonymous Apex in the Developer Console. Examples that use insert or SOQL create real records in your org, so run them in a Developer Edition org 4 min readif statements, and read basic Apex classes. You should also know that anonymous Apex runs in the Developer Console. It covers declaring enums, using their built-in methods, branching with switch, converting strings to enum values, and the lim4 min readnull as covered in earlier chapters. It covers how = and the compound operators (+=, -=, and so on) behave. It also covers how assignment differs between primitives and collections, and the errors 3 min readnull means in Apex. Apex differs from Java and JavaScript here in several ways that cause real bugs.3 min read&&, ||, and !. It explains how short-circuit evaluation works and where it fails. It assumes you know Boolean values, if statements, and how null behaves in Apex (see the earlier chapters on null and comparison).4 min read? :, the safe navigation operator ?., and the null coalescing operator ??. It assumes you know how Apex variables, null, and if statements work, and that you can run anonymous Apex in the Devel4 min read