You need to sign in to do that
Don't have an account?
nikitha kambam
Which three statements are accurate about variable scope?
A. Parallel blocks can reuse the same variable name.
B. A sub -block can reuse a parent block variable name if it is static.
C. A variable can be declared at any point In a block.
D.A sub -block can reuse a parent block's variable name if it is not static
Answers:A,C,d
is it correct
B. A sub -block can reuse a parent block variable name if it is static.
C. A variable can be declared at any point In a block.
D.A sub -block can reuse a parent block's variable name if it is not static
Answers:A,C,d
is it correct
refer : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_variables.htm
subblocks can not reuse a parent block variable name whether it is static or not.
Check this link - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_variables.htm#:~:text=Variable%20Scope&text=Sub%2Dblocks%20can't%20redefine,can%20reuse%20a%20variable%20name.