Hi Vivek,
Good question. I got the same confusion before.
Remember, call by array pass reference, call by primitive type passing value.
public class Test{
...
public static void main(String args[]){
int i = 10;
Changer c = new Changer(i,args);
System.out.println("this is i :"+i+" in main.");
System.out.println(args[0] + "" + args[1]);
}
}
static class Changer{
void method(int i, String s[]){
int iC = ( i-1);
...//as yours
}
}
the output is: this is i: 10 in main
Mouse Mighty
i passed by value, array passed by reference.
Hopefully, it helps.
I suppose if you pass a class in arg, still pass by referece(this point is I guess, but I believe it is true).
Simon