How do I get this program to organize the data in the same Array
so that first the numbers are greater than 0 and then the zeros in the Ordenar()
method? For example:
Entry
(2,3,0,1,0)
Exit
(2,3,1,0,0)
Here I post the code that I have
Scanner leer=new Scanner(System.in);
for(i=0;i<a.length;i++){
System.out.print("ingrese posicion["+i+"]=");
a[i]=leer.nextInt();
}
Ordenar();
}//main
static public void Ordenar(){
//Código que necesito
}