目录 一、题目二、代码三、运行结果 一、题目 二、代码 class Solution { public boolean canJump(int[] nums) { int i = 0; int length = nums.length; int cover =0; while(i<= cover &&i<length) { cover = Math.max(cover,i+nums[i]); i++; } return cover >=length-1 ; } } 三、运行结果