In "Reverse words in a string" this problem, we need to skip all the extra space when we process the final result. Here we can regard 0s as spaces, then my solution as follows:

```
public void moveZeroes(int [] nums) {
int i = 0, j = 0;
int n = nums.length;
while (j < n) {
while (j < n && nums[j] == 0) j++;
while (j < n && nums[j] != 0) a[i++] = a[j++];
}
for (int k = i; k < n; k++) nums[k] = 0;
}
```