import java.io.BufferedWriter;

import java.io.FileWriter;

import java.io.IOException;

 

 

public class TextFileWriter

{

       public static void main(String[] args)

       {

             BufferedWriter bufferedWriter;

             try

             {

                    bufferedWriter = new BufferedWriter(new FileWriter("C:/test.txt"));

                   

                    if(null != bufferedWriter)

                           System.out.println("파일생섬됨");

                    bufferedWriter.write("HelloWorld!");

                    bufferedWriter.close();

             }

             catch (IOException e)

             {

                    e.printStackTrace();

             }

       }

}


저작자 표시 비영리 변경 금지
신고
YOUR COMMENT IS THE CRITICAL SUCCESS FACTOR FOR THE QUALITY OF BLOG POST


티스토리 툴바