Skip to content

Commit 626eb0f

Browse files
committed
replace backslash with percent for newline
1 parent d3ff9e0 commit 626eb0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CCSPiJ/src/chapter9/Knapsack.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public static void main(String[] args) {
7878
items.add(new Item("painting", 10, 1000));
7979
List<Item> toSteal = knapsack(items, 75);
8080
System.out.println("The best items for the thief to steal are:");
81-
System.out.printf("%-15.15s %-15.15s %-15.15s\n", "Name", "Weight", "Value");
81+
System.out.printf("%-15.15s %-15.15s %-15.15s%n", "Name", "Weight", "Value");
8282
for (Item item : toSteal) {
83-
System.out.printf("%-15.15s %-15.15s %-15.15s\n", item.name, item.weight, item.value);
83+
System.out.printf("%-15.15s %-15.15s %-15.15s%n", item.name, item.weight, item.value);
8484
}
8585
}
8686

0 commit comments

Comments
 (0)