in Education by
Which of these exception is thrown in cases when the file specified for writing is not found? (a) IOException (b) FileException (c) FileNotFoundException (d) FileInputException I got this question in exam. My enquiry is from Reading & Writing Files topic in portion I/O & Applets of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
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.

Related questions

0 votes
0 votes
    What kind of an exception will be thrown if the string to parse is not valid JSON? (a) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Which exception is thrown by read() method? (a) IOException (b) InterruptedException (c) SystemException (d ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these handles the exception when no catch is used? (a) Default handler (b) finally (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these keywords is not a part of exception handling? (a) try (b) finally (c) thrown (d) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    How can we get the size of specified file? (a) capacity(path) (b) size(path) (c) length(path) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these methods sets every element of a List to a specified object? (a) set() (b) fill() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these clause will be executed even if no exceptions are found? (a) throws (b) finally (c ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
...