Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.lang.reflect.Array;

public class Main {
    public static Object[] getArray(Object val) {
        int len = Array.getLength(val);
        Object[] outputArray = new Object[len];
        for (int i = 0; i < len; ++i) {
            outputArray[i] = Array.get(val, i);
        }
        return outputArray;
    }
}