I\'m trying to sort an array in ascending order. For some reason it only performs the for loop once. Why doesn\'t it keep going until everything is sorted?
It\'s for
This will sort an array in ascending order
int arr[]={33,3,4,5,1}; Arrays.sort(arr); System.out.println(Arrays.toString (arr));
output will:-[1,3,4,5,33]