class Solution {
public boolean canJump(int[] nums) {
int coverIndex = 0;
for (int i = 0; i <= coverIndex; i++) {
coverIndex = Math.max(i+nums[i],coverIndex);//i+nums[i]表示每个nums[i]可以对应的最大范围
if (coverIndex >= nums.length - 1) return true;
}
return false;
}
}



