how to use sort function of arraylist in java code example Example: sort an arraylist of integer //METHOD RETURNS VOID Collections.sort(arrayList);