Skip to content

Commit b45ee3b

Browse files
authored
Update LiteralSyntaxForByteArraysUsingHexNotation.java
1 parent f32fd57 commit b45ee3b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core-java-modules/core-java-collections-maps-8/src/literalsyntaxforbytearraysusinghexnotation/LiteralSyntaxForByteArraysUsingHexNotation.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ public static void initializeByteArrayWithDecimal() {
1616
public static void initializeByteArrayWithHex() {
1717
byte[] byteArray = {0x0A, 0x14, 0x1E, 0x28, 0x32};
1818
for (byte b : byteArray) {
19-
logger.info("0x{:02X}", b);
19+
logger.info(String.format("0x%02X", b));
2020
}
2121
}
2222

2323
public static void main(String[] args) {
2424
initializeByteArrayWithDecimal();
2525
initializeByteArrayWithHex();
2626
}
27-
2827
}

0 commit comments

Comments
 (0)