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