I know Java is always passing by value. However in the following code
public class Test{
String str = new String("good");
char[] ch = {'a','b','c'};
int i = 10;
public void change(String str,char ch,int i){
str = "test ok";
ch = 'g';
this.i = i+1;
}
public static void main(String[] args){
Test tt = new Test();
tt.change(tt.str,tt.ch[0],tt.i);
System.out.println(tt.i);
System.out.print(tt.str+" and ");
System.out.println(tt.ch);
}
}
The output of tt.i is 11. What is the "this " mean? Why it could change the value of i?