index x out of bounds for length x
Only 2 values in an array object (Corresponding to Index 0 & 1),
thus while accesing index 2, it throws an error
index x out of bounds for length x
Only 2 values in an array object (Corresponding to Index 0 & 1),
thus while accesing index 2, it throws an error
index 1 out of bound for length 1 java
1 means index 1 is invalid and it's out of bound i.e. more than the length of the array.
Since array has a zero-based index in java , this means you are trying to access the second element of
array which only contains one element.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us