StringBuffer java - what is StringBuffer in java

StringBuffer java :-

1) StringBuffer class is like same as String.

2) StringBuffer class is thread-safe means method are synchronized.

3) StringBuffer class is mutable sequence of characters.

4) Main method in StringBuffer class are append and insert method.

5) Through the insert method you can insert string after any index of the string.

6) There are four constructors in StringBuffer class.

    public StringBuffer()
     public StringBuffer(int capacity)
    public StringBuffer(String str)
    public StringBuffer(CharSequence seq)

Comments

Recent Post

Recent Posts Widget

Popular posts from this blog

Capture image from webcam java code, examples

How to capture finger prints in java

Shallow Copy Deep Copy Java example