[2,5,0,0] should return false, as per my understanding of the problem. How the expected answer is true ? Can someone please explain ? Here's y Java solution,

```
public boolean canJump(int[] nums) {
if(nums.length == 0 || nums == null)
return false;
if(nums.length == 1)
return true;
int jumpIndex = 0, jumpLen;
int arrlen = nums.length;
while(true){
if(jumpIndex < arrlen){
if(nums[jumpIndex] == 0 && jumpIndex != arrlen-1){
return false;
}
jumpLen = nums[jumpIndex];
jumpIndex += jumpLen;
if(jumpIndex == arrlen-1){
return true;
}
}else if(jumpIndex >= arrlen){
return true;
}
}
}
```