Which statement is true?

Given that the current directory is empty, and that the user has read and write privileges to the current directory, and the following:
import java.io.*;
public class Maker {
public static void main(String[] args) {
File dir = new File("dir");
File f = new File(dir, "f");
}
}
Which statement is true?
A. Compilation fails.
B. Nothing is added to the file system.
C. Only a new file is created on the file system.
D. Only a new directory is created on the file system.
E. Both a new file and a new directory are created on the file system.

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.