Java.io.PrintWriter.write String len() 方法 Java.io.PrintWriter.write String() 方法 Java.io.PushbackInputStream.available() 方法 Java.io.PrintWriter.write String len() 方法 package com.codingdict; import java.io.*; public class PrintWriterDemo { public static void main(String[] args) { String s = "Hello World"; try { // create a new writer PrintWriter pw = new PrintWriter(System.out); // write substrings pw.write(s, 0, 5); pw.write(s, 6, 5); // flush the writer pw.flush(); } catch (Exception ex) { ex.printStackTrace(); } } } Java.io.PrintWriter.write String() 方法 Java.io.PushbackInputStream.available() 方法