• 코드:
 
1
public class prog {
2
    public static void main(String[] args) {
3
        StringBuffer str = new StringBuffer("Java Oracle");
4
        System.out.println("원본 문자열 : " + str);
5
        
6
        System.out.println(str.delete(4, 8));
7
        System.out.println(str.deleteCharAt(1));
8
        System.out.println("deleteCharAt() 메소드 호출 후 원본 문자열 : " + str);
9
    }
10
}
표준입력 & 실행옵션