import java.io.*;


public class TestExceptions {
	public static void main(String[] args) {
		File f = new File("test1.txt");
		RandomAccessFile input = null;
		String line = null;
		// Exception fehlt
		try{
			input = new RandomAccessFile(f, "r");
		}
		catch (FileNotFoundException e)
		{
			System.out.println("FileNotFound");
		}

		try{
			while ((line = input.readLine()) != null) {
				try{
					int n = Integer.parseInt(line);
					System.out.println(n);
					//System.out.println(line);
				}
				catch (NumberFormatException e)
				{
					System.out.println(line + " ist kein int");
				}
			}
		}
		catch (IOException e)
		{
			System.out.println("IOException");
		}
	}
}