8.64 출력문용 문자 버퍼 흐름 개선

776 단어
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
/*
 *       。
 */
public class SystemOutDemo2 {
 public static void main(String[] args) throws IOException {
  //        
  // // PrintStream ps = System.out;
  // // OutputStream os = ps;
  // OutputStream os = System.out; //   
  // //                              ?
  // OutputStreamWriter osw = new OutputStreamWriter(os);
  // BufferedWriter bw = new BufferedWriter(osw);
  BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
  bw.write("hello");
  bw.newLine();
  // bw.flush();
  bw.write("world");
  bw.newLine();
  // bw.flush();
  bw.write("java");
  bw.newLine();
  bw.flush();
  
  bw.close();
 }
}

좋은 웹페이지 즐겨찾기