Depends on your need, do you necessary need an ArrayList?
#1) If you need sorting but is the number unique? The provided example is (3, 5, 8, 10) and to add (6). If there is another '3', should the result return (3,3,5,6,8,10)? If NOT, why not consider a NavigableSet/SortedSet such as TreeSet ?
import java.util.*;
...
NavigableSet<Integer> navSet = new TreeSet<>(Arrays.asList(new Integer[]{3,5,8,10});
navSet.add(6); //you'll get 3,5,6,8,10
navSet.add(6); //still get 3,5,6,8,10 -- no extra 6
#2) Is the number non unique but to be ordered ? There is a collection provided by Apache for BAG(combining Set and List). Apache Commmons Collection Bag
import org.apache.commons.collections4.Bag;
import org.apache.commons.collections4.bag.TreeBag;
...
Bag<Integer> treeBag = new TreeBag<>(Arrays.asList(new Integer[]{3,5,6,8,10});
treeBag.add(6); //you'll get 3,5,6,6,8,10
#3) Else if you really need to code it manually. There is always a Collections util to sort it after you add, e.g.
import java.util.*;
List<Integer> arrayList = Arrays.asList(new Integer[]{3,5,5,8,10});
List sortedList = arrayList.stream().parallel().sorted()collect(Collectors.toList());
//you'll get (3,5,5,6,8,10), as it gets sorted again.
Finally, the sorting above for #2 and #3 is always slower as there is an add then re-sort. If you want something that optimized via search while rebuilding the list, like Stephen P provided in the other answer, it may be a better solution. But as always consider your implementation.
add(...)takes care of that.