标签:strong ar for art sp amp on c bs
private void ex01()
{
int[] nums = { 8, 10, 3, 4, 12, 200 };
for (int i = nums.length - 1; i >= 1; i--)
{
System.out.println(nums.length);
if (i == 1)
{
System.out.println(nums[i]);
}
else
{
nums[i - 1] = nums[i];
System.out.format("%d,", nums[i]);
}
}
}
the output above are: 200, 200, 200, 200, 200
you should understand nums.length start counting at 1, nums[i] start counting at 0
标签:strong ar for art sp amp on c bs
原文地址:http://www.cnblogs.com/ammay/p/3942369.html