Friday, 14 June 2013

program in java - input demo or load characters

/**
 * @(#)iodemo.java
 *
 *
 * @author
 * @version 1.00 2013/4/1
 */
import java.io.*;
class iodemo
{
    public static void main(String []args)
    {
        try
        {
            FileOutputStream fos=new FileOutputStream("text.txt");
            DataOutputStream dos=new DataOutputStream(fos);
            dos.writeChars("Anant");
            dos.close();
        }
        catch(Exception e){}
    }
}

No comments: