StringBuffer Constructors Example

StringBuffer is mutable and String is immutable. To modify the string present in the buffer, many methods are defined in StringBuffer class. Apart methods, there are 4 types of StringBuffer Constructorsas on Java SE 7. public StringBuffer() public StringBuffer(int initialCapacity) public StringBuffer(String str) public StringBuffer(CharSequence seq) Let us see what Java API says about StringBuffer …

StringBuffer Constructors Example Read More »