Question: Assume you have a method header like this: foo(int i) Inside the method, you have code that looks like this: i++; Is it legal to

Assume you have a method header like this: foo(int i) Inside the method, you have code that looks like this: i++; Is it legal to change a parameter's value inside of a method? Does it affect variables held by the caller?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!