// This is a simple example of exception handling.

import java.util.*;
import java.io.*;

public class TextFilePrinter {

	public static void FilePrinter(String fname) {
		try {
			Scanner printer = new Scanner( new File(fname));
			while (printer.hasNextLine()) {
				String line = printer.nextLine();
				System.out.println(line);
			}
		}
		catch (FileNotFoundException e) {
			System.out.printf( "File %s not found\n", fname);
		}
	}
	
	public static void main(String[] args) {
		FilePrinter( args[0]);
	}

}
