Final
// Declare Constant Variable
final Decimal PI;
System.debug(PI); //prints null
// initialize variable
PI = 3.14159;
System.debug(PI);
// update variable value - NOT ALLOWED
PI = 2.14159;
System.debug(PI);
Last updated
// Declare Constant Variable
final Decimal PI;
System.debug(PI); //prints null
// initialize variable
PI = 3.14159;
System.debug(PI);
// update variable value - NOT ALLOWED
PI = 2.14159;
System.debug(PI);
Last updated