StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("string"); System.out.println("String = " + stringBuilder.toString());