MCQs > IT & Programming > Java > Which code snippet will check for the existence of the file «text.txt» in the current location?

Java MCQs

Which code snippet will check for the existence of the file «text.txt» in the current location?

Answer

Correct Answer: File f = new File(); f.setName(«text.txt»); System.out.println(f.exists());

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More Java MCQ Questions

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it