StringBuffer sb = new StringBuffer("Hello"); sb.append(" World"); System.out.println(sb.toString());
StringBuffer sb = new StringBuffer(); sb.append("The quick brown"); sb.append(" fox jumps over"); sb.append(" the lazy dog."); System.out.println(sb.toString());Output: `The quick brown fox jumps over the lazy dog.` In this example, an empty StringBuffer object is created, and then the append() method is called three times with three different string parameters. Each of these strings is added to the end of the existing string, resulting in the final output of "The quick brown fox jumps over the lazy dog." The java.util package is a built-in package in Java, so no external libraries or packages need to be imported or installed.