Java Utililty Methods Array Print

List of utility methods to do Array Print

Description

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

Method

voidprintFloatArray(float[] arr)
print Float Array
StringBuilder sb = new StringBuilder("Length: ");
sb.append(arr.length);
sb.append("\n");
for (int i = 0; i < arr.length; i++) {
    if (i > 0) {
        sb.append(", ");
    sb.append(arr[i]);
...
voidprintFloatArray(float[] array)
Print a float array
for (int i = 0; i < array.length; i++) {
    System.out.println("Array [" + String.valueOf(i) + "] = " + String.valueOf(array[i]));
voidprintln(int[] array)
println
for (int i = 0; i < array.length; i++) {
    System.out.print(array[i] + " ");
System.out.println();
voidprintln(Object[] objs)
println
System.out.println(Arrays.asList(objs));
ListprintMap1(String[] s)
print Map
List<String> list = new LinkedList<String>();
List<String> list2 = Arrays.asList(s);
list.addAll(list2);
return list;
voidprintOutArrayProperty(String key, E[] property, boolean isDefault)
print Out Array Property
StringBuilder value = new StringBuilder();
for (int i = 0; i < property.length; i++) {
    value.append(property[i].toString());
    if (i != property.length - 1) {
        value.append(",");
if (isDefault) {
...
StringprintParameterMap(Map parameters)
print Parameter Map
StringBuilder sb = new StringBuilder();
sb.append("{");
for (Entry<String, String[]> entry : parameters.entrySet()) {
    sb.append("[" + entry.getKey() + "->" + Arrays.toString(entry.getValue()) + "]");
sb.append("}");
return sb.toString();
StringprintPoint(double[] ds)
print Point
List<Double> list = new ArrayList<Double>(ds.length);
for (double d : ds) {
    list.add(d);
return list.toString();
voidprintUsage(String[] args)
print Usage
System.out.println("Invalid arguments: " + Arrays.asList(args).toString() + "\n");
System.out.println(
        "Usage: TestRecordsUtil -n <numRecords> -o <delete|insert|upsert> -q <account number pattern>");
System.out.println("\nExample:\n\tTestRecordsUtil -o delete -q \"where AccountNumber like 'ACCT%'\"");
System.exit(-1);
voidprintVector(T array[])
Given a vector prints it to the console
for (T temp : array) {
    System.out.println(temp);