Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/06/2012, 02:27
arratete
 
Fecha de Ingreso: febrero-2012
Mensajes: 39
Antigüedad: 12 años, 2 meses
Puntos: 0
Respuesta: Ordenamiento Arraylist

Conseguido:

Código:
int[] arrayList={3,8,7,2,5,4,9};
		int aux;
		int t = arrayList.length;
 
		for (int i = 1; i < t; i++) 
		{
			for (int j = t- 1; j >= i; j--) 
			{
				if(arrayList[j] < arrayList[j-1])
				{
					aux = arrayList[j];
					arrayList[j] = arrayList[j-1];
					arrayList[j-1]=  aux;
				}
			}
		}