2

I am trying to sort an Array of Strings in alphabetical order using scala. The Strings are passed in an array when the method is called. The method must also return an array with the sorted Strings. How would I do this?

Thanks

Mike

0

1 Answer 1

7

You just need to call array.sorted.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.