This is the self
test question of K&B.
I did not under stand the question or the answer what it means.
Tried looking at the API but didn't help either.
Can some one please explalin what's going on?
And the invocation is
java Directores file2.txt
is issued from a directory that has two subdirectories "dir1" and "dir2" and that "dir1" has a file "file1.txt" and "dir2" has a file "file2.txt",
and the out put is :
false true
Which set of code fragments must be inserted?
1.
String path=d;
System.out.println(file.exists() + " ");
2. String path=d;
System.out.println(file.isFile() + " ");
3. String path=File.separator + d;
System.out.println(file.exists() + " ");
4. String path=File.separator + d;
System.out.println(file.isFile() + " ");