Anything other than the primitive types (such as int , byte etc) are passed by reference by default . You are passing the same StringBuilder instance to the method. They will be passed by reference but if they are immutable, there is no change on them.
Read more