Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
    }
}