StringBuffer.insert(int offset, boolean b) has the following syntax.
public StringBuffer insert(int offset, boolean b)
In the following code shows how to use StringBuffer.insert(int offset, boolean b) method.
//w w w. j a v a 2 s .c om public class Main { public static void main(String args[]) { StringBuffer buffer = new StringBuffer(); boolean booleanValue = true; buffer.insert(0, booleanValue); System.out.println(buffer.toString()); } }
The code above generates the following result.