While opening a file in java, what kind of exceptions may occur?
FileNotFoundException, which is an unchecked exception.
FileNotFoundException, which is a checked exception.
There won't be any exception when we are opening a file.
When we are trying to open a file, it may throw FileNotFoundException in case if we are trying to open a file which doesn't exist.
FileNotFoundException is a checked exception, which programmer has to handle.
Back To Top