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

Choose the word that describes a person who is smart but in a sneaky way. A. Sharp. B. Cunning. C. Intelligent. D. Skillful.
1. What is the value of the expression below? Please show work 3⁴+9= A.21 B.39 C.43 D.90 2. Which expression is equivalent to 5(d+1)? Please show work A.5d+5 B.
Juan Ramirez sells suits in a major department store on weekends. he earns a commission of 5 percent on the first ten suits, and if he sells more than ten, he e
whats the integral of 1/X
what elements are involved in hydrogen bonding
HELP HELP HELP HELP PLEASE (sorry ) can u complete this tiny is to .................. as broad is to ........................ the words to fill this in are tiny
who the famous artist in our time
what were National and State Bank policies in the 1830's contributed to?
PLEASE CHECK MY ANSWERS (PART 1)
what is the formula for a cylinder and a circle?