Question: are java strings passed by reference?
Answer: Nothing in java is passed by reference, and since a string is immutable, that assignment creates a new string object that the copy of the reference now points to. The original reference still points to the empty string. This would be the same for any object, i.e., setting it to a new value in a method.