-
What is the output of this program?
import java.io.*;
public class files_Example
{
public static void main(String args[])
{
File object = new File("/New Folder/system");
System.out.print(object.getParent());
System.out.print(" " + object.isFile());
}
}
-
- /New
- Folder false
- /New false
- /New Folder false
- None of these
Correct Option: D
getparent() giver the parent directory of the file and isfile() checks weather the present file is a directory or a file in the disk