+ 1

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0

why im getting this error ?

18th Nov 2022, 3:24 PM
shivam prajapati
shivam prajapati - avatar
2 ответов
+ 5
It means You are trying to attempt elements of array beyond it's boundary or exceed length.. edit: yes. Empty array accessing..
18th Nov 2022, 3:25 PM
Jayakrishna 🇮🇳
+ 4
It write exactly the issue. The array is empty (length=0) and you try acess the 1st element(index=0).
18th Nov 2022, 3:36 PM
Giannis
Giannis - avatar