You are here:   HomeJava ProgrammingJava Array
by Dinesh Thakur Category: array

StringBuffer deleteCharAt (int index): This method deletes the character at the specified position index from the string buffer. For example,

StringBuffer s1= new StringBuffer ("Helloo Java");

str.deleteCharAt(4);

As a result, the character at the index 1 from the string buffer will be deleted and will now contain "Hello Java".

public class StringBufferdeleteCharAt

{
          public static void main(String[] args)
      {
             StringBuffer s1 = new StringBuffer("Helloo Java");
             s1.deleteCharAt(4);
             System.out.println("s1 : " + s1);
          }
}

StringBuffer deleteCharAt() Method in Java Example



What's New and Popular