Since String is a final class, new memory is allocated and the pointer is changed every time you change its value. So, in a sense, Strings are passed by value, not reference.