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