Ayudanme Urgente los ke sepan estoy haciendo esto y me guie del metodo De Burbuja
pero no se donde tengo el error y tampoco se como hacerlo
n.intValue() es donde estan todos los datos solo ke no se hacer para recorrerlos e ir remplazamdo
Cita:
public static Lista Ascendente(Lista l){
Lista Organizados = new Lista();
int aux;
l.reiniciar();
while(!l.fin()){
Integer n = (Integer)l.infor();
Integer j = (Integer)l.infor();
Integer i = (Integer)l.infor();
for(i=0; i < n.intValue()-1; i++){
for(j=0; j < n.intValue()-1; j++){
if(j.intValue()> (j.intValue()+1)){
aux=j.intValue();
j.intValue()=(j.intValue()+1);
(j.intValue()+1)=aux;
Organizados.insertarInicio(null,n);
}}}
l.siguiente();
}
return Organizados;
}
}
|
ya tengo las clase Lista Hecha y el error ke aparece es el siguiente
G:\Universidad III Semestre\Estructura De Datos\Taller1\TallerListas.java:71: unexpected type
required: variable
found : value
j.intValue()=(j.intValue()+1);
^
G:\Universidad III Semestre\Estructura De Datos\Taller1\TallerListas.java:72: unexpected type
required: variable
found : value
(j.intValue()+1)=aux;
^
2 errors
Process completed.