public class Solution {

public void rotate(int[] nums, int k) {

if (nums.length<=1||k>nums.length) return;

int[] ret = new int[nums.length];

int j=0;

for (int i=nums.length-k;i<nums.length;i++){

ret[j++]=nums[i];

}

for (int m=0;m<nums.length-k;m++){

ret[j++]=nums[m];

}

```
}
```

}