What is an accurate statement about variable scope? - ProProfs Discuss
Topics
Products
Follow Us:

What is an accurate statement about variable scope?



A. Sub-blocks cannot reuse a parent block s variable name.
B. A variable can be defined at any point in a block.
C. Parallel blocks can use the same variable name.
D. Sub-blocks can reuse a parent block s variable name if its value is null.
E. A static variable can restrict the scope to the current block if its value is null.

This question is part of Platform 1d
Asked by Kevindotcar, Last updated: Aug 12, 2020

+ Answer
Request

1 Answer

John Smith

John Smith

Answered Dec 13, 2016

Sub-blocks cannot reuse a parent block s variable name.
A variable can be defined at any point in a block.
Parallel blocks can use the same variable name.

Https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_variables.htm
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.