Java program for cteating a text file

Program

import  java.io.File;
class test
{
public static void main(String[] args)

{
try
        {
            Writer output = null;
            File file = new File("E:\\testdemo.txt");
            output = new BufferedWriter(new FileWriter(file));
            for(int i=0;i<1;i++)
            {
                output.close();
                System.out.println("file writtern");
            }
        }
        catch(Exception ex)
        {
            System.out.println(ex);
        }

}

Comments

Popular posts from this blog

Optical Charactor Recognition (OCR) in C#

How to create a transparent window in Windows Form Application

Installing MASM on Windows (32 bit or 64 bit)