没问题呀    String fileName="g:\\test.txt";
    String message="hello the world\r\nwux love hjl";
    try{
      FileWriter fileOut = new FileWriter(fileName);
      PrintWriter printOut=new PrintWriter(fileOut);
      printOut.write(message);
      //fileOut.write(message);
      fileOut.close();
    }
    catch(IOException e){
      System.out.println(e.getMessage());
    }