Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import java.util.List;

public class Main {
    public static <E> List<E> toList(Iterable<? extends E> iterable) {
        final List<E> list = new ArrayList<E>();

        for (E e : iterable) {
            list.add(e);
        }

        return Collections.unmodifiableList(list);
    }
}