Solved

If a Local Variable in a Method Has the Same

Question 31

Multiple Choice

If a local variable in a method has the same name as a variable in the main program,what will occur?


A) an error is generated
B) the variable in the main program is "hidden" until the method is finished executing
C) the variable in the main program will override the variable from the method
D) None of the above.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents