Java.io.StringWriter.write() 方法 Java.io.StringWriter.write Char() 方法 Java.io.StringWriter.write String() 方法 Java.io.StringWriter.write() 方法 package com.codingdict; import java.io.*; public class StringWriterDemo { public static void main(String[] args) { // create a new writer StringWriter sw = new StringWriter(); // write integers that correspond to ascii code sw.write(70); sw.write(76); // print result by converting to string System.out.println("" + sw.toString()); } } Java.io.StringWriter.write Char() 方法 Java.io.StringWriter.write String() 方法