StringBuilder sb = new StringBuilder("Hello"); sb.deleteCharAt(1); System.out.println(sb); // Output: "Helo"
StringBuilder sb = new StringBuilder("Hello World"); sb.delete(5, 11); System.out.println(sb); // Output: "Hello"The package library for StringBuilder class is java.lang.StringBuilder. It is a part of the core java library that provides basic utilities for working with strings.