diff --git a/src/praktikum4/table2.java b/src/praktikum4/table2.java index e7d60db..2980932 100644 --- a/src/praktikum4/table2.java +++ b/src/praktikum4/table2.java @@ -8,10 +8,12 @@ public class table2 { int y_size = x_size; // table size in y direction // Create the table + // print the first line of the box System.out.printf("--"); for (int x = 0; x <= x_size; x++) { System.out.printf("--"); } + //print the table contents System.out.printf("-%n"); for (int x = 0; x <= x_size; x++) { System.out.printf("| "); @@ -28,6 +30,7 @@ public class table2 { //we are at the end of the line, start a new one System.out.printf("|%n"); } + // print the last line of the box System.out.printf("--"); for (int x = 0; x <= x_size; x++) { System.out.printf("--");