Java – String, String Buffer and String Builder Classes

Creating strings:


output: hello
public StringBuffer append append(String s)
public stringBuffer append(boolean b)
public StringBuffer append(char c)
replace(),delete(), reverse(),capacity(),length(),setCharAt(int index,char ch),setLength(),String subString(int start),String subString(int start,int end)

one example in buffer class:

length() and capacity() method


For more example:
I will see in future
– Java the complete reference(Best examples here)
– Oracle Java Library
– Android Reference
– Tutorials point for explanation


Spread the love