Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.ArrayList;

public class Main {
    public static <T> ArrayList<T> resize(ArrayList<T> list, int size) {
        if (list == null)
            list = new ArrayList<T>(size);
        list.ensureCapacity(size);
        for (int i = 0; i < size; i++)
            list.add(null);
        return list;
    }
}