StringBuilder str = new StringBuilder("Hello, World!"); str.delete(7, 13); System.out.println(str);
StringBuilder.delete(int start, int end)Parameters: - start: The index position of the first character that we want to remove. - end: The index position immediately after the last character that we want to remove. Return Value: - returns the reference of the StringBuilder object.