Suppose we have a list nbrList of type ArrayList<Integer>. The numbers in the list are sorted in ascending order. Change the code to insert the number nbr so that instead of being inserted last, it is sorted into the correct place in the list.
Example: If nbrList contains the numbers 5, 7, 12, 20 and nbr has the value 8, the list must contain 5, 7, 8, 12, 20 after the insertion.