hi guys,
can anyone explain me this question from one of the mock exams:
What will be the output?
Consider a directory structure like this (NT or 95)
C:\JAVA\12345.msg --FILE
import java.io.*;
public class IO {
public static void main(
String args[]) {
File f1 = new File("\\12345.msg");
System.out.println(f1.getPath());
System.out.println(f1.getParent());
System.out.println(f1.isAbsolute());
System.out.println(f1.getName());
System.out.println(f1.exists());
System.out.println(f1.isFile());
}
}
the ans is:
\12345.msg
\
true
12345.msg
false
false
thanks....waiting for your replies.
prasanthi