Apex

Avoid null pointer exceptions by using the safe navigation operator (?.). Make partial or full updates to a resource in an HTTP web service by specifying the PATCH method in the HttpRequest class. Create, configure, and send custom notifications directly from Apex code using the Messaging.CustomNotification class. Detect Apex runtime context using RequestId and Quiddity values. Improve Apex testing with the new SObject error methods. The Database.deleteImmediate() method now supports batch deletes of up to 50,000 big object records at once. The @namespaceAccessible annotation provides enhanced support for accessing Apex in second-generation packages.

For more information on these enhancements, refer to the Apex Developer Guide.