List of utility methods to do Array Output
void | printArrayOfUnknownObjectsOnePerLine(Object[] array) print Array Of Unknown Objects One Per Line final StringBuffer sb = new StringBuffer(); sb.append("Object Array: [\n"); for (Object o : array) { final String fullyQualifiedName = o.getClass().toString(); final String shortClassName = fullyQualifiedName.substring(fullyQualifiedName.lastIndexOf(".") + 1, fullyQualifiedName.length()); sb.append("\t(" + shortClassName + ": " + o.toString() + ")\n"); System.out.println(sb.substring(0, sb.length() - 1) + "]"); |