```
public class Solution {
public boolean canJump(int[] nums) {
int front = 0;
for(int i=0; i<=front; i++) {
front = Math.max(front, i+nums[i]);
if(front >= nums.length-1) return true;
}
return front >= nums.length-1;
}
```

}