List<Integer> list = new ArrayList<Integer>();
Collections.max(list)
List<Integer> list = new ArrayList<>(); // Creating List
list.add(3); //add elements
list.add(6);
list.add(9);
int maxNum = Collections.max(list); //save the biggest element in variable
System.out.println(max); //print 9