package l34;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class XmpChecked {
	
	public String readFirstLine(String file) {
		Scanner rfl;
		String fl="?";
		try {
			rfl = new Scanner(new File(file));
			fl=rfl.nextLine();
			rfl.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			// e.printStackTrace();
			fl="You idiot... file " + file + " isn't there!";
		}
		
		return fl;
	}

	public static void main(String[] args) {

		XmpChecked c = new XmpChecked();
		System.out.println("First Quote: " + c.readFirstLine("quotes.txt"));
		
	}

}
