import java.util.*;
public class MoveAllZero{
public static void main(String args[]){
int my_arr[]={0,0,0,1,2,0,3,0,4,0,5,5};
int i=0;
int l = my_arr.length;
for(int n : my_arr){
System.out.print(n+" ");
}
System.out.println();
for(int j=0; j<l;){
if(my_arr[j]==0){
j++;
} else{
int temp=my_arr[i];
my_arr[i]=my_arr[j];
my_arr[j]=temp;
i++;
j++;
}
}
System.out.println("After moving all zeros to the end of the arrays, the new array is : ");
for(int n : my_arr){
System.out.print(n+" ");
}
}
}