List of utility methods to do Array Output
void | printArray(char[] array) print Array StringBuilder buf = new StringBuilder(); for (int i = 0; i < array.length; ++i) { if (i == 0) { buf.append("["); buf.append("'").append(array[i]).append("'"); } else { buf.append(","); buf.append("'").append(array[i]).append("'"); ... |
void | printArray(double[] array) print Array System.out.print("Double Array: ["); for (int i = 0; i < array.length; i++) { System.out.print(array[i]); if (i != array.length - 1) { System.out.print(", "); System.out.println("]"); ... |
void | printArray(double[] array, String msgBefore, String msgAfter) print Array System.out.print(msgBefore); System.out.print(arrayToString(array)); System.out.print(msgAfter); |
String | printArray(double[][] in) print Array if (in == null) return "null"; String out = ""; for (int i = 0; i < in.length; i++) { for (int j = 0; j < in[0].length; j++) { out += in[i][j] + " "; out += "\n"; ... |
String | printArray(double[][] in) print Array if (in == null) return "null"; String out = ""; for (int i = 0; i < in.length; i++) { for (int j = 0; j < in[0].length; j++) { out += in[i][j] + " "; out += "\n"; ... |
void | printarray(final int[] a) printarray StringBuilder s = new StringBuilder(); for (int i : a) { s.append(i); s.append(", "); if (s.length() >= 1) { s.deleteCharAt(s.length() - 1); s.append("\n"); System.err.print(s.toString()); |
void | printArray(final Object[] array, int indent) utility method, prints out an array using the toString() method of the members. System.out.println(toString(array, indent, false, true)); |
void | printArray(float[] arr) Prints out the array to standard output. if (arr == null) { System.out.println("Null array."); return; for (int i = 0; i < arr.length - 1; i++) { System.out.print(arr[i] + " "); System.out.print(arr[arr.length - 1]); ... |
String | printArray(int arr[]) print Array String ret = "[ "; for (int i = 0; i < arr.length; i++) { ret += arr[i] + ", "; return ret.substring(0, ret.length() - 2) + " ]"; |
void | printArray(int[] arr) print Array printArray(arr, "\t");
|