```
class Solution {
public void moveZeroes(int[] nums) {
int l = nums.length;
int count = 0;
for (int i = 0; i < l; i++) {
if(count != 0)
nums[i-count] = nums[i];
if (nums[i] == 0) {
count++;
}
}
for(int i=l-count;i<l;i++){
nums[i] = 0;
}
}
}
```