Java tutorial
//package com.java2s; import java.util.Collection; import java.util.Vector; public class Main { public static Vector arrayToVector(Object[] array) { Vector data = new Vector(); arrayToCollection(data, array); return data; } public static void arrayToCollection(Collection c, Object[] array) { for (int i = 0; i < array.length; i++) c.add(array[i]); } }