```
public class Solution {
public void moveZeroes(int[] nums) {
int i = 0 ;
while(i < nums.length && nums[i] != 0){
i++;
}
int temp;
for(int j = i+1 ; j < nums.length ; j++){
if(nums[j] != 0){
temp = nums[i];
nums[i] = nums[j];
nums[j] = temp;
i++;
}
}
}
}
```