package FileHandling;
import java.io.File;
public class PathFile {
/**
* @param args
*/
public static void main(String[] args) {
File f =new File("D:\\abhi\\as.txt");
System.out.println("Is this a file: "+f.isFile());
System.out.println("Is this a directory: "+f.isDirectory());
System.out.println(f.getPath());
System.out.println(f.getAbsolutePath());
}
}
import java.io.File;
public class PathFile {
/**
* @param args
*/
public static void main(String[] args) {
File f =new File("D:\\abhi\\as.txt");
System.out.println("Is this a file: "+f.isFile());
System.out.println("Is this a directory: "+f.isDirectory());
System.out.println(f.getPath());
System.out.println(f.getAbsolutePath());
}
}
0 comments:
Post a Comment