Java Utililty Methods Array Output

List of utility methods to do Array Output

Description

The list of methods to do Array Output are organized into topic(s).

Method

voidprintArrayOfUnknownObjectsOnePerLine(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) + "]");