LearnFrenzy
Sign in Take a free test

Strings and StringBuilder · Java Strings MCQ · Question 1

What does String immutability mean? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
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!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links