Thursday, November 26, 2009
Example to Determine if a File or Directory Exists
import java.io.*;
public class filedirexists{
public static void main(String args[])
{
File filedir=new File("File or Directory exists or not!!")
boolean exists = filedir.exists()
if (!exists)
{
System.out.println("The File/Directory you are looking for is not found")
}
else
{
System.out.println("The File/Directory you are looking for available")
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment