1.

Which of these exception is thrown in cases when the file specified for writing is not found?(a) IOException(b) FileException(c) FileNotFoundException(d) FileInputExceptionI got this question in exam.My enquiry is from Reading & Writing Files topic in portion I/O & Applets of Java

Answer» RIGHT OPTION is (C) FileNotFoundException

Explanation: In cases when the file specified is not found, then FileNotFoundException is thrown by JAVA run-time system, earlier versions of java used to throw IOException but after Java 2.0 they throw FileNotFoundException.


Discussion

No Comment Found

Related InterviewSolutions