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