Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/**
 * Copyright (c) 2015 FeedHenry Ltd, All Rights Reserved.
 *
 * Please refer to your contract with FeedHenry for the software license agreement.
 * If you do not have a contract, you do not have a license to use this software.
 */

import java.util.ArrayList;

public class Main {
    private static <T> T[] prependTo(T outerInstance, T[] params) {
        ArrayList<T> paramsList = new ArrayList<>(params.length + 1);

        paramsList.add(outerInstance);
        for (T param : params) {
            paramsList.add(param);
        }
        return paramsList.toArray(params);
    }
}