public
StringBuffer()
Constructs
a string buffer with initial capacity of
16characters in it. Initially there are no characters in it.
class StringBufferConstructor1{ public static void main(String args[]){ StringBuffer str = new StringBuffer(); System.out.println("str = " + str); System.out.println("Initial Capacity is " + str.capacity()); } }
Output
str = Initial Capacity is 16
No comments:
Post a Comment