Java Array Print printVector(T array[])

Here you can find the source of printVector(T array[])

Description

Given a vector prints it to the console

License

Open Source License

Parameter

Parameter Description
array Array which is to be printed

Declaration

public static <T> void printVector(T array[]) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    /** //from w w  w.  j a v a2s.c  o  m
     * Given a vector prints it to the console
     * @param array Array which is to be printed
     */
    public static <T> void printVector(T array[]) {

        for (T temp : array) {

            System.out.println(temp);
        }
    }

    /** 
     * Given a list prints it to the screen
     * @param vector List which is to be printed
     */
    public static <T> void printVector(List<T> vector) {

        for (T temp : vector) {

            System.out.println(temp);
        }
    }
}

Related

  1. printMap1(String[] s)
  2. printOutArrayProperty(String key, E[] property, boolean isDefault)
  3. printParameterMap(Map parameters)
  4. printPoint(double[] ds)
  5. printUsage(String[] args)
  6. printWithIndex(double[] arr)
  7. toPrintableString(final byte[] bytes)