Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static <T extends Comparable<? super T>> List<T> toSortedList(Collection<T> collection) {
        List<T> list = new LinkedList<>(collection);
        Collections.sort(list);

        return list;
    }
}