1import java.util.*;
2public class CollectionsMaxExample2 {
3public static void main(String[] args) {
4//Create collections lists.
5List<Integer> list = Arrays.asList(20, 10, 100, 140, 250);
6Integer max = Collections.max(list);
7System.out.println("Maximum element is: "+max);
8}