+ 2
Method variable passing naming conventions
Is it bad practice to use the same name of the variable you are passing as the variable a method receives?
2 Réponses
+ 5
In my opinion, it is easier for us to recheck our code.
static int sum(int x){
return x+10;
}
int x=4;
System.out.print(sum(x) );
//Output 14
we will not become confuse
0
I don't know