Is it a good practice to change arguments in Java

Viewed 15701

Suppose I am writing a method foo(int i) in Java.
Since i is passed by value it is safe to change it in foo. For example

void foo(int i) {
   i = i + 1; // change i
   ...
}

Is it considered good or bad practice to change arguments of methods in Java?

6 Answers
Related