lekingbrian3270 lekingbrian3270
  • 14-09-2019
  • Computers and Technology
contestada

Declaring a variable in the method’s body with the same name as a parameter variable in the method header is ___________.

a.a syntax error

b.a logic error

c.a logic error

d.not an error

Respuesta :

Branta Branta
  • 16-09-2019

Answer:

a. a syntax error

Explanation:

When the same variable name is repeated in the parameter set and the method body, it will result in a syntax error. This is because the variable in the parameter has a local scope within the method body. Now if we declare another variable with the same name in the method body, it will result in redefinition of the variable and violate the uniqueness principle of variable names in the method code. This will give rise to syntax error.

Answer Link

Otras preguntas

1 Select the correct answer. Choose the word that best completes this sentence. También ocurren de nieve y se llaman nevascas. O A. huracanes OB. tormentas O c.
3340 divided by 8 Need the answers
Who is your favorite best anime girl (if you want, you can show a pic of your choice of them)
Why did John Jay believe the Articles of Confederation were failing?
−n/3 = 4 what does n equal
what do you think of my edit?​
PLEASE HELP WLL GIVE BRAINLIEST how does Sylvia feel in the rising action and how do you know (example from the story) (this story is the white heron btw)
use "government" in a very easy simple sentence
PLZZZZ HELP 20 POINTS+ BRAINLIEST In pea plants, the allele for round seeds is dominant and the allele for wrinkled seeds is recessive. Under what conditions w
what are the meaning of growth and development?