Java StringBuffer.insert(int offset, boolean b)
Syntax
StringBuffer.insert(int offset, boolean b) has the following syntax.
public StringBuffer insert(int offset, boolean b)
Example
In the following code shows how to use StringBuffer.insert(int offset, boolean b) method.
//from w w w .ja v a2s . co m
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.