i need this program to sort an array of strings alphabetically, I.e. if array[0] is zak, and array[1] is bob, then the arrays should switch order....
/*
import java.io.*;
public class ArrayLab
{
public static void main(String[] asdf) throws IOException
{
InputStreamReader reader = new InputStreamReader(System.in);
BufferedReader input = new BufferedReader(reader);
System.out.print("How many names? : ");
int arraysize=Integer.parseInt(input.readLine());
String [] names = new String [arraysize];
for(int z=0;z<arraysize;z++)
{
System.out.print("Please enter a name: ");
names[z] = input.readLine();
System.out.println("");
System.out.println("");
System.out.println(" Would you like to change a name? (1 for yes , 2 for No)");
int choice= Integer.parseInt(input.readLine());
for(int z=0; z<1;)
{
if(choice==2)
z=1;
else if(choice==1)
{
System.out.println(" Which name would you like to change? (0 -" + arraysize + " )");
int arraychoice= Integer.parseInt(input.readLine());
System.out.println( " Enter changes : ");
String arraychange=input.readLine();