What is the effect of the assignment greeting2 = greeting?
After calling greeting2.toUpperCase(), what are the contents of greeting and greeting2?
Now greeting and greeting2 both refer to the same String object.
Both variables still refer to the same string, and the string has not been modified. Recall that the toUpperCase method constructs a new string that contains uppercase characters, leaving the original string unchanged.