Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

java General  RSS feed

 
Gangireddy Danam
Ranch Hand
Posts: 32
Java Redhat
  • Mark post as helpful
  • send pies
  • Report post to moderator
Why String object content cant be changed..?
How StringBuffer content changable..?..
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Report post to moderator
The 'why can't String contents be changed' question has been asked many times. See these results.

Your second question: How is StringBuffer content changeable might not be asked so often. The StringBuffer content is changeable by virtue that it holds the character sequence in a format that can be modified and provides methods with which to do the modification - methods for doing things like appending, inserting, and deleting from the internal sequence of characters.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!