Create a tmp file using java.

satheesh

New Member
Messages
883
Reaction score
0
Points
0
Copy the Code Below and Paste it.


Code:
package satheesh;
import java.io.*;

class CreateTmp
{
    public static void main(String arg[])
    {
        File f1=null;
        try
        {
        f1.createTempFile("Satheesh",".tmp");
        }
        catch (IOException e)
        {
            System.out.print("Error:"+e);
        }
    }
    
}

Save as "CreateTmp.java" and Compile it.
Run it.
This Program Create a tmp file in the Temp Directory.

Good Luck.
 
Top