Valid PDI Dumps shared by EduDump.com for Helping Passing PDI Exam! EduDump.com now offer the newest PDI exam dumps, the EduDump.com PDI exam questions have been updated and answers have been corrected get the newest EduDump.com PDI dumps with Test Engine here:
Access PDI Dumps Premium Version
(205 Q&As Dumps, 35%OFF Special Discount Code: freecram)
Recent Comments (The most recent comments are at the top.)
Final variables can only be assigned a value once, either when you declare a variable or inside a constructor. You must assign a value to it in one of these two places.
A developer is implementing an Apex class for a financial system. Within the class, the variables ‘creditAmount’ and ‘debtAmount’ should not be able to change once a value is assigned. In which two ways can the developer declare the variables to ensure their value can only be assigned one time? Choose 2 answers
Use the final keyword and assign its value when declaring the variable.
Use the final keyword and assign its value in the class constructor.
Its A and D. B is not the answer because Static final variables can be changed in static initialization code or where defined.
Refer:- https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_final.htm and
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_constants.htm
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_final.htm
D is correct answer. A and C are wrong.
B would be correct if was Use the final keyword and assign its value in a static initializer.
Refer : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_constants.htm
It's B, D