Answer:
The answer is below
Step-by-step explanation:
This can be done in two ways, which are:
1. Sorting the array manually
2. Using the toCharArray() method
The neater version is Using the toCharArray() method: Here this can be done by following these steps:
a. Ensure you have the needed string.
b. Modify the provided string to a character array with the help of toCharArray() method.
c. Construct the gathered array by utilizing the sort() method of the Arrays class.
d. Transform the constructed array to String by passing it to the constructor of the String array.