Home » JAVA Programming » Files and I/O » Question
  1. Which of these exception is thrown in cases when the file specified for writing is not found?
    1. FileInputException
    2. FileNotFoundException
    3. FileException
    4. IOException
    5. None of these
Correct Option: B

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.



Your comments will be displayed only after manual approval.