Java StringBuffer.deleteCharAt(int index)
Syntax
StringBuffer.deleteCharAt(int index) has the following syntax.
public StringBuffer deleteCharAt(int index)
Example
In the following code shows how to use StringBuffer.deleteCharAt(int index) method.
public class Main {
public static void main(String args[]) {
StringBuffer sb = new StringBuffer("java2s.com.");
//from w w w . j a v a 2 s . co m
sb.deleteCharAt(0);
System.out.println("After deleteCharAt: " + sb);
}
}
The code above generates the following result.