Which method will arrange the elements of an array an in alphabetical order?
Answers
Answered by
1
Answer
In java,it is compareTo() method.
Answered by
3
Answer:
To arrange the elements in an array in ascending order, we use one simple technique called Bubble Sort.
It is a simple sorting algorithm which compares two numbers side by side and swaps them if the order in which they are arranged is wrong.
It repeats this method until the entire array of elements is sorted from the smallest to the largest.
Similar questions