StringBuffer.delete(int start, int end) has the following syntax.
public StringBuffer delete(int start, int end)
In the following code shows how to use StringBuffer.delete(int start, int end) method.
public class Main { public static void main(String[] argv) { StringBuffer sb = new StringBuffer(); sb.append(true);/*from w w w . ja v a 2 s . c o m*/ sb.append("java2s.com"); sb.delete(1, 2); System.out.println(sb.toString()); } }
The output: