function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vijayabhaskarareddy yarrabothulavijayabhaskarareddy yarrabothula 

is it necessary to initialize public static final integer?

EldonEldon
Hi Vijaya,

No you can also do it like below and it works,
 
public static final integer i;
i=3;

But once it is initialised you cant change the value.
Refer : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_final.htm


Close the thread if it cleared your doubt by marking as best answer.

Regards