import java.util.Scanner;
import java.io.*;

public class FileNotFound_Caught
{
   //-----------------------------------------------------------------
   //  Deliberately try to open a file that does not exist.
   //-----------------------------------------------------------------
   public static void main (String[] args)
   {
		try
		{
 			Scanner scan = new Scanner (new File("myfile.txt"));

	      int number = scan.nextInt();
		}
		catch(FileNotFoundException e)
		{
			System.out.println ("Caught a FileNotFoundException.");
		}
		finally 
		{
			System.out.println ("This text will be printed.");
		}
   }
}
