Untitled
Anonymous
java
12/08/2021 9:41 AM
836 B
22
Indexable
import java.io.FileInputStream;
import java.io.FileNotFoundException;
public class FileNotFoundExceptionExample
{
public void checkFileNotFound()
{
try
{
FileInputStream in = new FileInputStream("input.txt");
System.out.println("This is not printed");
}
catch (FileNotFoundException fileNotFoundException)
{
fileNotFoundException.printStackTrace();
}
}
public static void main(String[] args)
{
FileNotFoundExceptionExample example = new FileNotFoundExceptionExample();
example.checkFileNotFound();
}
}Editor is loading...