?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Easy

Sorting an Array of Values

APCSA-BVTRDL

What would the array below look like after it is sorted in ascending order?

String[] array = {"35", "2", "150", "18", "2021", "318"};
A
["35", "2", "150", "18", "2021", "318"]
B
["2021", "318", "150", "35", "18", "2"]
C
["150", "18", "2", "2021", "318", "35"]
D
["2", "18", "35", "150", "318", "2021"]
E
["35", "318", "2021", "2", "18", "150"]