stringbuffer capacity

capacity() StringBuffer Example

StringBuffer comes with many utility methods to do operations on strings that do not exist in String class. One such method is capacity() StringBuffer. StringBuffer class comes with two methods – length() to find the number of characters present in the buffer and capacity() method to know the buffer size.…

length() and capacity() Example StringBuffer

An example on StringBuffer methods length() and capacity() is given in Simple terms for a Beginner. Finding length() and capacity() In Java coding, the programmer should be aware of not only methods of a class but also constructors. Constructors give the properties for an object at the time of creation…