diff options
author | Julian T <julian@jtle.dk> | 2020-09-08 13:43:21 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-09-08 13:43:21 +0200 |
commit | c009693a07276f8d66cd68637431f0a3f0e9ef15 (patch) | |
tree | fc9bc85620813e7a179b043203d25879932267f6 /sem5/oop/m2/opg2/src/Main.java | |
parent | ba5f68924664b081aab1abb62c68e2fb70bdff0b (diff) |
Added more java assignments
Diffstat (limited to 'sem5/oop/m2/opg2/src/Main.java')
-rw-r--r-- | sem5/oop/m2/opg2/src/Main.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sem5/oop/m2/opg2/src/Main.java b/sem5/oop/m2/opg2/src/Main.java new file mode 100644 index 0000000..532bc72 --- /dev/null +++ b/sem5/oop/m2/opg2/src/Main.java @@ -0,0 +1,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); + } + +} |