Skip to content

Commit 5757623

Browse files
add one more print method for boolan arrays
1 parent d746434 commit 5757623

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/com/fishercoder/common/utils/CommonUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ public static <T> void printArray_generic_type(T[] nums) {
2121
System.out.println();
2222
}
2323

24+
public static void printArray(boolean[] booleans) {
25+
for (boolean i : booleans) {
26+
System.out.print(i + ", ");
27+
}
28+
System.out.println();
29+
}
30+
2431
public static void main(String... strings) {
2532
Integer[] nums = new Integer[]{1, 2, 3, 4, 5};
2633
printArray_generic_type(nums);

0 commit comments

Comments
 (0)