Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <T> List<T> merge(List<List<T>> list) { List<T> result = new ArrayList<>(); list.stream().forEach(result::addAll); return result; } }