Skip to content

Commit f1b4bab

Browse files
add a generic printList method
1 parent d746043 commit f1b4bab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎Common/src/utils/CommonUtils.java

+8
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,12 @@ public static void printIntegerList(List<List<Integer>> res) {
162162
}
163163
}
164164

165+
public static <T> void printList(List<T> list) {
166+
for(T t : list){
167+
System.out.print(t);
168+
System.out.print(",");
169+
}
170+
System.out.println();
171+
}
172+
165173
}

0 commit comments

Comments
 (0)