can you check this program for me
<p>hi i write this program for sorting an array of type String alphabetical  without using comapreTo() method 
so i am saying that if you can find errors in my program please tell me i will try to to fix it </p>

<pre><code>class some{
public static void main(String[] args)  {
  String array[]={"names here"};
  System.out.print("before:");
 for (int    i=0 ;i&lt;array.length;i++ ) 
    System.out.print(array[i]+" ");

 array  = SortA(array);
      System.out.println();
           System.out.print("after:");
     for (int    i=0 ;i&lt;array.length;i++ ) 
      System.out.print(array[i]+" ");


 }//end of main method

    public static int getSmallestRange(String[] array){
        int range = array[0].length()-1;
        for (int i =0;i&lt;array.length ;i++ ) {

            if(range&gt;array[i].length()-1){
                range = array[i].length()-1;

            }

        }
        return range ;
}
  public static String[] SortA(String [] array){
         String tmp="";
  int index = 0 ;
  for (int i =0;i&lt;array.length ;i++ ) 
        for (int j = i+1;j&lt;array.length ;j++ ) {
              if(array[i].charAt(index)&gt;array[j].charAt(index)){
                          tmp = array[i];
                          array[i] = array[j];
                          array[j] = tmp ;
              }//end of if
        }//end of loop
        index++;

        for (int x =0;x&lt;array.length-1 ;x++ ){
              for (int y =x+1;y&lt;array.length ;y++ ) {


              if(array[x].charAt(0)==array[y].charAt(0)){

                    if(array[x].charAt(index)&gt;array[y].charAt(index)){
                          tmp = array[x];
                          array[x] = array[y];
                          array[y] = tmp ;

                    }

                    else if(array[x].charAt(index)==array[y].charAt(index)){
                    if(index&lt;getSmallestRange(array))
                          index++;
                    }

              }//end of if
        }//end of loop
  }

  return array;
}//end of method
</code></pre>

<p>}</p>
