Please help me. i am working on this project and i believe that i am going the wrong way on it. it says to create a String array call ss. It will contain the following Strings in the order shown.
{“Bill”, “Mary”, “Lee”, “Agnes”, “Alfred”, “Thomas”, “Alvin”, “Bernard”, “Ezra”,“Herman”} Using this methodto sort this array and then print the contents of thepublic static void sort(int a[]) //Signature Example: int b[] = {14, 2, 109, . . . 23, 5, 199}; Arrays.sort(b);
sorted array (using a loop) from index 0 to the last. Call both your project and class,
SortStringArray. Confine all of your code to the main method.
The printout should look like the following:
Agnes
Alfred
Alvin
Bernard
Bill
Ezra
Herman
Lee
Mary
Thomas
this is what i have so far :please send me some feedback on thisimport java.io.*; import java.util.*; public class sortstringarray { public static void main(String args[]) { for(int a = 0; a <= 9; a++) Int 0 = "Bill"; Int 1 = "Mary"; Int 2 = "Lee"; Int 3 = "Agnes"; Int 4 = "Alfred"; Int 5 = "Thomas"; Int 6 = "Alvin"; Int 7 = "Bernard"; Int 8 = "Ezra"; Int 9 = "Herman"; String ss[] = {a}; Arrays.sort(ss); System.out.print(ss); } }