Methods of StringBuffer class in Java.

Java 8Object Oriented ProgrammingProgramming

Following are the various constructors provided by the StringBuffer class.

S.N.
Constructor & Description
1StringBuffer()
This constructs a string buffer with no characters in it and an initial capacity of 16 characters.
2StringBuffer(CharSequence seq)
This constructs a string buffer that contains the same characters as the specified CharSequence.
3StringBuffer(int capacity)
This constructs a string buffer with no characters in it and the specified initial capacity.
4StringBuffer(String str)
This constructs a string buffer initialized to the contents of the specified string.
raja
Published on 12-Feb-2018 13:26:41
Advertisements