StringBuilder sb = new StringBuilder();
sb.append("Hello");
sb.append(" ");
sb.append("World");
System.out.println(sb.toString()); // Output: Hello World
StringBuilder sb = new StringBuilder("Hello World");
sb.insert(5, ","); // Insert a comma at index 5
System.out.println(sb.toString()); // Output: Hello, World
StringBuilder sb = new StringBuilder("Hello, World");
sb.delete(5, 7); // Delete characters from index 5 to 7
System.out.println(sb.toString()); // Output: Hello World
StringBuilder sb = new StringBuilder("Hello, World");
sb.replace(7, 12, "Java"); // Replace characters from index 7 to 12 with "Java"
System.out.println(sb.toString()); // Output: Hello, Java
StringBuilder sb = new StringBuilder("Hello");
sb.reverse();
System.out.println(sb.toString()); // Output: olleH