MCPcopy Index your code
hub / github.com/Blankj/awesome-java-leetcode / print

Method print

src/com/blankj/structure/ListNode.java:40–52  ·  view source on GitHub ↗
(ListNode listNode)

Source from the content-addressed store, hash-verified

38 }
39
40 public static void print(ListNode listNode) {
41 if (listNode == null) {
42 System.out.println("null");
43 return;
44 }
45 StringBuilder str = new StringBuilder("[" + String.valueOf(listNode.val));
46 ListNode p = listNode.next;
47 while (p != null) {
48 str.append(",").append(String.valueOf(p.val));
49 p = p.next;
50 }
51 System.out.println(str.append("]"));
52 }
53}

Callers 7

mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected