Ordenação de vetor String e preenchimento aleatório do vetor - problemas

Pessoal, sou novato em java então já deixo meu pedido de desculpas pelo código rudimentar, ainda estou no começo da faculdade =P

É bem simples, estou tentando fazer um código que preencha um vetor String aleatoriamente e depois organize ele ( de “B,C,A,E,D,F” para “A,B,C,D,E,F”, por exemplo…), então bolei uma gambiarra com Random para preencher o vetor com letras, mas por algum motivo, quando o vetor é preenchido com o Random, a ordenação não funciona, quando eu preencho manualmente o vetor, a ordenação funciona, aparentemente ele não esta entrando no If que faz a ordenação.

Segue o código preenchido manualmente, este funciona :

public static void main(String[] args) {
		// TODO Auto-generated method stub
		String vet[]={"L","F","H","E","F","D","B","Z","A"};
		String maior=" ";
		//ordenacao
		for(int inicio=0;inicio<vet.length;inicio++)
		{
			for(int fim=inicio+1;fim<vet.length;fim++)
			{
				if((int)vet[inicio].charAt(0)>(int)vet[fim].charAt(0))
				{
					maior=vet[inicio];
					vet[inicio]=vet[fim];
					vet[fim]=maior;
				}
			}
			
		}
		//verificacar ordenacao
		for(int cel=0;cel<vet.length;cel++)
		{
			System.out.println(vet[cel]+" verificacao final");
		}

	}


Segue o código Random, não funciona a ordenação - 

public static void main(String[] args) {
		// TODO Auto-generated method stub
		String []vet=new String[20];
		String letras="QWERTYUIOPASDFGHJKLÇZXCVBNM",saux=" ",maior=" ";
		int tam=1,aux1=0;
		//preenchimento do vetor
		Random gerador=new Random();
		for(int cel=0;cel<vet.length;cel++,saux=" ")
		{
			for(int cel2=0;cel2<tam;cel2++)
			{
				aux1=gerador.nextInt(27);
				if(aux1==0)
				{
					aux1++;
				}
				saux+=letras.substring((aux1-1),aux1);
			}
			vet[cel]=saux;
		}
		//verificacao de preenchimento
		for(int cel=0;cel<vet.length;cel++)
		{
			System.out.println(vet[cel]+" verificacao");
		}
		//ordenacao
		for(int inicio=0;inicio<vet.length-1;inicio++)
		{
			System.out.println("for1");
			for(int fim=inicio+1;fim<vet.length;fim++)
			{
				System.out.println("for2");
				if((int)vet[inicio].charAt(0)>(int)vet[fim].charAt(0))
				{
					System.out.println("if");
					maior=vet[inicio];
					vet[inicio]=vet[fim];
					vet[fim]=maior;
				}
			}
			
		}
		//verificaçar ordenaçao
		for(int cel=0;cel<vet.length;cel++)
		{
			System.out.println(vet[cel]+" verificacao final");
		}
	}

OBS : esse monte de system.out… é para eu ver onde ta dando problema ^^

Gostaria que me ajudassem a saber o por que dessa ordenação não esta funcionando, meu conhecimento ainda é limitado então não faço ideia. Abraço!

A tabela ASCII que no caso referido foi utilizado no seu código é assim:

Dec  Char                           Dec  Char     Dec  Char     Dec  Char
---------                           ---------     ---------     ----------
  0  NUL (null)                      32  SPACE     64  @         96  `
  1  SOH (start of heading)          33  !         65  A         97  a
  2  STX (start of text)             34  "         66  B         98  b
  3  ETX (end of text)               35  #         67  C         99  c
  4  EOT (end of transmission)       36  $         68  D        100  d
  5  ENQ (enquiry)                   37  %         69  E        101  e
  6  ACK (acknowledge)               38  &         70  F        102  f
  7  BEL (bell)                      39  '         71  G        103  g
  8  BS  (backspace)                 40  (         72  H        104  h
  9  TAB (horizontal tab)            41  )         73  I        105  i
 10  LF  (NL line feed, new line)    42  *         74  J        106  j
 11  VT  (vertical tab)              43  +         75  K        107  k
 12  FF  (NP form feed, new page)    44  ,         76  L        108  l
 13  CR  (carriage return)           45  -         77  M        109  m
 14  SO  (shift out)                 46  .         78  N        110  n
 15  SI  (shift in)                  47  /         79  O        111  o
 16  DLE (data link escape)          48  0         80  P        112  p
 17  DC1 (device control 1)          49  1         81  Q        113  q
 18  DC2 (device control 2)          50  2         82  R        114  r
 19  DC3 (device control 3)          51  3         83  S        115  s
 20  DC4 (device control 4)          52  4         84  T        116  t
 21  NAK (negative acknowledge)      53  5         85  U        117  u
 22  SYN (synchronous idle)          54  6         86  V        118  v
 23  ETB (end of trans. block)       55  7         87  W        119  w
 24  CAN (cancel)                    56  8         88  X        120  x
 25  EM  (end of medium)             57  9         89  Y        121  y
 26  SUB (substitute)                58  :         90  Z        122  z
 27  ESC (escape)                    59  ;         91  [        123  {
 28  FS  (file separator)            60  <         92  \        124  |
 29  GS  (group separator)           61  =         93  ]        125  }
 30  RS  (record separator)          62  >         94  ^        126  ~
 31  US  (unit separator)            63  ?         95  _        127  DEL

então, muitas vezes você não pega o alfabeto corretamente, o que você poderia fazer para randonizar isso:

Crie um array de vetor com as letras de A à Z:

String base[] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "L", 
        "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "X", "Z"};

E o seu código ficaria assim:

int quantidade = 10;
Random random = new  Random();
String vet[]= new String[quantidade];
String base[] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "L", 
	"M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "X", "Z"};
	
for(int inicio=0;inicio<vet.length;inicio++)
{   
	vet[inicio] = base[random.nextInt(base.length)];
}

String maior=" ";
//ordenacao
for(int inicio=0;inicio<vet.length;inicio++)
{
		for(int fim=inicio+1;fim<vet.length;fim++)
		{
				if((int)vet[inicio].charAt(0)>(int)vet[fim].charAt(0))
				{
						maior=vet[inicio];
						vet[inicio]=vet[fim];
						vet[fim]=maior;
				}
		}

}

//verificacar ordenacao
for(int cel=0;cel<vet.length;cel++)
{
		System.out.println(vet[cel]+" verificacao final");
}

Mesmo assim, possa ser que o random repita números, mas, pode ser adequada da sua maneira.

Então deixa eu ver se entendi, a ordenação estava falhando por que na hora de pegar o valor da letra na tabela ASCII e unir na String, ele somava os valores em uma unica String, o que ocasionava o não funcionamento do If?

Não…

Quando você pega o valor da tabela ASCII, você podia está pegando Caracater de 0 a 27 que compreende:

  0  NUL (null)                      
  1  SOH (start of heading)        
  2  STX (start of text)           
  3  ETX (end of text)             
  4  EOT (end of transmission)     
  5  ENQ (enquiry)                 
  6  ACK (acknowledge)             
  7  BEL (bell)                    
  8  BS  (backspace)               
  9  TAB (horizontal tab)          
 10  LF  (NL line feed, new line)  
 11  VT  (vertical tab)            
 12  FF  (NP form feed, new page)  
 13  CR  (carriage return)         
 14  SO  (shift out)               
 15  SI  (shift in)                
 16  DLE (data link escape)        
 17  DC1 (device control 1)        
 18  DC2 (device control 2)        
 19  DC3 (device control 3)        
 20  DC4 (device control 4)        
 21  NAK (negative acknowledge)    
 22  SYN (synchronous idle)        
 23  ETB (end of trans. block)     
 24  CAN (cancel)                  
 25  EM  (end of medium)           
 26  SUB (substitute)              
 27  ESC (escape) 

porque você estipulo random.nextInt(27), entendeu ( só tem caracter nesse caso ) ?