Java tutorial
//package com.java2s; import java.lang.reflect.*; public class Main { static public Object extractArray(Object[] list, int pos, int n) { Class type = list.getClass().getComponentType(); Object temp = Array.newInstance(type, n); System.arraycopy(list, pos, temp, 0, n); return temp; } }