StringBuilder sb = new StringBuilder(); sb.append("Hello "); sb.append("world"); System.out.println(sb.toString()); // Output: "Hello world"
StringBuilder sb = new StringBuilder("String"); sb.insert(3, "inserted "); System.out.println(sb.toString()); // Output: "Strinserted ing"
StringBuilder sb = new StringBuilder("Reverse"); sb.reverse(); System.out.println(sb.toString()); // Output: "esreveR"Package library: java.io package is a part of the Java SE (Standard Edition) platform and is used to perform various input/output operations such as reading and writing files, creating input/output streams, etc.