Adjustments around validation and %n

This commit is contained in:
Bruce Eckel 2017-05-13 22:21:43 -06:00
parent 3c96d6d412
commit 7ca318ddde
4 changed files with 3 additions and 3 deletions

View File

@ -2,6 +2,7 @@
// (c)2017 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// {ValidateByHand}
import java.util.*;
import java.util.concurrent.*;
import java.util.stream.*;

View File

@ -3,7 +3,6 @@
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Displays Charsets and aliases
// !!!! CI has trouble
import java.nio.charset.*;
import java.util.*;

View File

@ -224,7 +224,7 @@ public class HTMLColors {
.limit(count)
.forEach(e ->
System.out.format(
"%-20s 0x%06X\n", e.getKey(), e.getValue()));
"%-20s 0x%06X%n", e.getKey(), e.getValue()));
}
public static void showInv(Map<String,Integer> m) {
showInv(m, m.size());

View File

@ -9,7 +9,7 @@ public class Underscores {
System.out.println(d);
int bin = 0b0010_1111_1010_1111_1010_1111_1010_1111;
System.out.println(Integer.toBinaryString(bin));
System.out.printf("%x%n", bin);
System.out.printf("%x%n", bin); // [1]
long hex = 0x7f_e9_b7_aa;
System.out.printf("%x%n", hex);
}