Here you can find the source of printVector(T array[])
Parameter | Description |
---|---|
array | Array which is to be printed |
public static <T> void printVector(T array[])
//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); } } }