Java Collection Print printObjectArray(Collection valueArrays)

Here you can find the source of printObjectArray(Collection valueArrays)

Description

print Object Array

License

Open Source License

Declaration

public static void printObjectArray(Collection valueArrays) 

Method Source Code


//package com.java2s;
import java.util.Collection;
import java.util.Iterator;

public class Main {
    public static void printObjectArray(Collection valueArrays) {
        System.out.println("[");
        for (Iterator iterator = valueArrays.iterator(); iterator.hasNext();) {
            Object[] values = (Object[]) iterator.next();

            System.out.print("[");
            for (int i = 0; i < values.length; i++) {
                Object value = values[i];
                System.out.print(value);
                if ((i + 1) < values.length)
                    System.out.print(",");
            }// ww  w  .ja v  a2 s . co m
            System.out.println("]");
        }
        System.out.println("]");
    }
}

Related

  1. printElement(Collection pCollection, boolean pAllElement)
  2. printElementsUnderCollection(Collection collection)
  3. printList(Collection collection)
  4. println(Collection lines, String suffix, String prefix)
  5. printMatrixList( Collection collection)