There are two different variables named "b". One is a member variable, while the other is a parameter to the "g()" method. The parameter is changed, but the member is printed.
The value of "c" is not changed; only the contents of the array c is changed. When you pass an array, it is a reference to the array is passed by value. "Pass by value" for objects like arrays doesn't mean that the value of the array or object itself is copied; only the reference is copied.