previous | start | next

Answers

  1. Now greeting and greeting2 both refer to the same String object.
  2. 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.


previous | start | next