Difference between String and StringBuffer.

Java 8Object Oriented ProgrammingProgramming

String class is immutable once you create an object of string you can modify its data.

The StringBuffer class is immutable, once you create a StringBuffer object you can change/modify the contents of it.

This class provides various methods to manipulate its data such as append(), delete(), insert() etc.

raja
Published on 12-Feb-2018 14:16:34
Advertisements