aboutsummaryrefslogtreecommitdiff
path: root/sem5/oop/m2/opg2/src/Main.java
blob: 532bc723f56ccf881b0b2776883359d06630c023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public class Main {

	public static void main(String[] args) {
		System.out.println("Get ready for cool stuff.");
		
		String fname = "hej.txt";
		if (args.length > 0) {
			fname = args[0];
		}
		
		Lines l = null;
		try {
			l = new Lines(fname);
		} catch (Exception e) {
			System.err.printf("error: %s%n", e);
			System.exit(1);
		}
		
		l.print(System.out);
	}

}