subject

Consider the following code, which is supposed to add a value passed to the method to an instance variable; however, there is a problem. Re-write this code, without renaming any variable names, to resolve this problem. Code:
private int number = 123;

public void addNumbers(int number)
{
number = number + number;
System. out. println("The local variable is: " + number);
System. out. println("The instance variable is: " + number);
}

Please help :(((

ansver
Answers: 3

Another question on Advanced Placement (AP)

question
Advanced Placement (AP), 25.06.2019 00:10
What is the power of 10 when 0.00503 is written is scientifically notation
Answers: 3
question
Advanced Placement (AP), 25.06.2019 11:40
The sociological perspective focuses on what? a. general social patterns b. individual behaviors c. biological explanations d. mental processes
Answers: 1
question
Advanced Placement (AP), 26.06.2019 15:30
Yo eat these free points uuppp cuz why not, right man? 30 to nom nom nym on.
Answers: 2
question
Advanced Placement (AP), 27.06.2019 07:30
The process that keeps heat from being transffered between two substances
Answers: 1
You know the right answer?
Consider the following code, which is supposed to add a value passed to the method to an instance va...
Questions
question
Mathematics, 04.11.2019 01:31