This process removes the font in a substring of this StringBuffer. The substring starts at the particular create and expands to the character at index end - 1 or to the end of the StringBuffer if no such quality exists. If start is equal to end, no modifies are made.
Here is the syntax for this method:
public StringBuffer delete(int start, int end)
Here is the detail of parameters:
This method returns the StringBuffer object.
public class Test { public static void main(String args[]) { StringBuffer sb = new StringBuffer("abcdefghijk"); sb.delete(3, 7); System.out.println(sb); } }
This will produce the following result:
abchijk
Here at Intellinuts, we have created a complete Java tutorial for Beginners to get started in Java.