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

Write the number that can be shown with this many hundreds tens and ones 1 hundred 2 tens 18 ones
What is 67 percent of 208
In multicellular organisms, life begins as a single cell until ___________ occurs, causing growth. A) conjugation B) fertilization C) meiosis D) mitosis
please help pic below
How does a senators term differ from a representatives? What is the reason for this difference?
Compound inequality solve for x -18x+21 > -15
Which sentence in "huckleberry finn" could be a synecdoche and represent the whole work?
The answer to the problem 3(6 - 7) + 8 is called a ____________. A). difference. B). product. C). quotient. D). sum
He clasps the crag with crooked hands; Close to the sun in lonely lands, Ringed with the azure world, he stands, The wrinkled sea beneath him crawls; He watche
-1/9 divided by 3/4 -4/27 -1/12 1/12 4/27