Very Simple program to create any file in java

It is very simple program to create any file

import java.io.*;
class SysExample
{
public static void main(String[] args) throws Exception
{
int c;
System.setOut(new PrintStream(new FileOutputStream(args[0])));
while((c=System.in.read()) != -1)
System.out.print((char)c);
}
}





Comments

  1. how to insert data into database using jsp in jdbc driver 4

    ReplyDelete
  2. hey dude...juz give me the program of java to transfer an image file from one system to another

    ReplyDelete

Post a Comment

Popular posts from this blog

How to set background color of navigation bar in iPhone

Checking Device Info in ios

Some Interactive tips to take input form GUI Dialogs