Question 1
Back to Exercise
What does it mean that String is immutable?
- A String variables cannot be reassigned
- B A String object's characters can never change; methods return new Strings Correct
- C Strings cannot be compared
- D Strings are stored on the stack
Correct Answer: Option B
The variable can point to a different String; the object itself never changes.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!