Java tutorial
//package com.java2s; import java.util.List; import java.util.Vector; public class Main { /** * Parses the list to the array. * @param list the instance of List * @return the array */ public static Object[] parseArray(List list) { return list.toArray(); } /** * Parses the vector to array. * @param vector the instance of Vector * @return the array */ public static Object[] parseArray(Vector vector) { return vector.toArray(); } }