public PrintWriter(OutputStream out,
                   boolean autoFlush)
Create a new PrintWriter from an existing OutputStream. This convenience constructor creates the necessary intermediate OutputStreamWriter, which will convert characters into bytes using the default character encoding.Parameters:out - An output stream
autoFlush - A boolean; if true, the println() methods will flush the output buffer

解决方案 »

  1.   

    public PrintWriter(Writer out,
                       boolean autoFlush)
    Create a new PrintWriter.Parameters:out - A character-output stream
    autoFlush - A boolean; if true, the println() methods will flush the output buffer
    //以上是PrintWriter的构造函数说明
    PrintWriter out =new PrintWriter(new java.io.OutputStreamWriter (System.out),true);
    new java.io.OutputStreamWriter (System.out):声明一个OutputStreamWriter
      

  2.   

    应该选a。PrintWrite是write类的子类,用于将数据送入字符输出流。
    PrintWriter out =new PrintWriter(new java.io.OutputStreamWriter (System.out),true);是新建一个PrintWrite的对象,该对象基于System.out流。
      

  3.   

    a正确无误,逐个拆分,找他们的API!
      

  4.   

    a.import java.io.PrintWriter;
    因为new java.io.OutputStreamWriter 已经把这个路径都搞进来了,所以就可以不用c了,若改成
    PrintWriter out =new PrintWriter(new OutputStreamWriter (System.out),true);
    那就是需要a和c了!