MCPcopy
hub / github.com/DuGuQiuBai/Java / printArray

Method printArray

day05/code/02_一维数组/ArrayTest3.java:43–53  ·  view source on GitHub ↗
(int[] arr)

Source from the content-addressed store, hash-verified

41
42 //Ч�����ÿ�
43 public static void printArray(int[] arr) {
44 System.out.print("[");
45 for(int x=0; x<arr.length; x++) {
46 if(x == arr.length - 1) {
47 System.out.print(arr[x]);
48 } else {
49 System.out.print(arr[x]+", ");
50 }
51 }
52 System.out.println("]");
53 }
54
55 /*
56 д����ʵ�֣�

Callers 1

mainMethod · 0.95

Calls 1

printMethod · 0.80

Tested by

no test coverage detected