Whats is the difference between string and string buffer in oop language
  • Hello i want to know about the difference between string and stringbuffer in oop language
  • 1 Comment sorted by

  • String is used to manipulate character strings that cannot be changed (read-only and immutable).

    StringBuffer is used to represent characters that can be modified.

    Performance wise, StringBuffer is faster when performing concatenations. This is because when you concatenate a String, you are creating a new object (internally) every time since String is immutable.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week