zoukankan      html  css  js  c++  java
  • IO写 PrintWriter

        private static final String FILENAME = "c:\temp\out.txt";

         PrintWriter pw = null; try { pw = new PrintWriter(FILENAME); pw.println("hello this is ross speaking"); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { pw.close(); }

    PrintWriter 源码:

    /*      */   public PrintWriter(String paramString)
    /*      */     throws FileNotFoundException
    /*      */   {
    /*  157 */     this(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(paramString))), false);
    /*      */   }
  • 相关阅读:
    LabVIEW入门第三天(软件及驱动包下载)
    poj1732
    poj1722
    poj1821
    poj1770
    poj1949
    poj1726
    poj1699
    poj1682
    poj1853
  • 原文地址:https://www.cnblogs.com/kakaisgood/p/6661498.html
Copyright © 2011-2022 走看看