Below is the code snippet which, as expected, is failing at compile time.
What I really want to do is to find the min and max from all the lists using streams.
public class Delete {
public static void main(String[] args) {
List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 677, 0);
List<Integer> list1 = Arrays.asList(11, 12, 23, 34, 25, 77);
List<Integer> list2 = Arrays.asList(12, 21, 30, 14, 25, 67);
List<Integer> list3 = Arrays.asList(41, 25, 37, 84, 95, 7);
List<List<Integer>> largeList = Arrays.asList(list, list1, list2, list3);
System.out.println(largeList.stream().max(Integer::compare).get());
System.out.println(largeList.stream().min(Integer::compare).get());
}
}