Apex

Batch Apex classes can now opt in to fire platform events when encountering an error or exception. Apex introduces inherited sharing on Apex classes, which allows the class to run in the sharing mode of the class that called it. A new System.Url.getOrgDomainUrl() method enables you to get endpoints for API calls so you can interact with Salesforce REST and SOAP APIs in Apex code. A new Callable interface lets you write code that other developers can build upon, even if their code is in a different package.

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