Question: Write a program that uses the sort method in the Java Arrays class to sort the elements in an array of String elements in alphabetical
Write a program that uses the sort method in the Java Arrays class to sort the elements in an array of String elements in alphabetical order. Use this array:
![String[] friends {](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1704/8/0/1/424659d34907541e1704801425210.jpg)
String[] friends {"Sheldon", "Amy", "Leonard", "Bernadette", "Raj"}; = Sample session: Amy Bernadette Leonard Raj Sheldon
Step by Step Solution
3.40 Rating (162 Votes )
There are 3 Steps involved in it
To sort an array of strings in Java you can use the Arrayssort method from the javautilArrays class ... View full answer
Get step-by-step solutions from verified subject matter experts
