```
public void moveZeroes(int[] nums) {
if(nums.length == 0) return;
int count = 0;
int s = 0;
for(int i = 0;i<nums.length;i++){
if(nums[i] !=0 ){
nums[s] = nums[i];
s++;
}
if(nums[i] == 0) count++;
}
int d = nums.length - count;
while(d < nums.length){
nums[d] = 0;
d++;
}
}
```