How to Get an Extra Hour (or More) Back in Your Day
October 26, 2017
Show all

A class static variable is a global variable that is associated with a particular class.

Multi-threaded application take care of synchronize access of static variables, to avoid race condition.

Static variable in Apex have execution context scope and lifetime, which means- static variables can only be accessed from within the execution context in which they are created, and are deleted when the execution context completes.

Static variable don’t persist information between execution contexts. They can’t be used to keep track of the overall execution of your application or to cache data or objects for use while your application is running.

Apex does not support application or session variable at all. Anything you want to persist must be stored in database object or custom settings.

Get more variable assistance at Developer.salesforce.com

Originally posted on Learn-Force.com

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: