1

You execute the code below in an empty directory. What is the result? File f1 = new File ("dirname");F ile f2 = new File (f1, "filename");

Correct Answer: A new file called filename is created in the current working directory.

Make the most of this question

This page focuses on one JAVA MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

JAVA MCQs MCQ: You execute the code below in an empty directory. What is the result? File f1 = new File ("dirname");F ile f2 = new File (f1, "filename"); | Extra Education