Java Error: java.lang.ArrayIndexOutofBoundsExeption

Status
Not open for further replies.

scootyty

Newbie level 4
Joined
Nov 22, 2007
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,308
java.lang.ArrayIndexOutofBoundsExeption

Can anyone tell me was does this means? i got a program that uses arrays. Sometimes i do get this error sometimes i don't and i really don't know how to fix this error. Help Someone?? Explain to me as well...

Thank you..
 

arrayindexoutofboundsexeption

Yes!!!

It's an exception : occurs when you try to access elements of an array by an INvalid Index ....

say your array is int abc[] = new int[10];
NOW
for (int i = 0; i<13;i ++)
abc = i;


I t will generate Error Bcoz Array size is just 10 but we are trying to access more elements

Also if array index goes negative in some expression this exception occurs

If u get it ... boost my confidence Click Helped Me
 

    scootyty

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…