answersLogoWhite

0


Best Answer

This is very common exception and name of the exception class tells exactly what kind of problem you have. If you would look into stack trace, which should have been generated too you would be able to find exact place where it happened.

The problem is that "Array Index Out Of Bounds". This means that you used index on array which is invalid. That could negative number, because all arrays starts from 0. If you array has N items and you will try to get item with index N or higher you will get this exception too. Only available indexes are from 0 to N - 1, where 0 points to the first item and N - 1 to the last one.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

It means that you are trying to read or write data into an index of the array that doesn't exist. For instance, if the array size is three, and you try to call array[3], this error will be thrown, since 2 is the maximum index.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

The actual exception is ArrayIndexOutOfBoundsException, and yes, it will be thrown at runtime if you attempt to access an array with an index that is outside the bounds of the array. Legal bounds for an array are from 0 to one less than the size of the array.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you fix an ArrayIndexOutOfBoundsException in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What means uncaught java.lang.error in a blackberry 9300 and how to fix it?

how do solve java


Is the java plug in safe for your computer?

The Java plug-in for the Java Runtime Environment (JRE) is safe for your computer in most cases. The Java company regularly tests for safety and security, so if a problem is detected a patch fix is released immediately.


How do you fix error 1721?

I just found out on how to fix the problem Error 1721. Very easy when i saw it. Basically you go on [Control panel]->[Add or Remove progams] Then if it says JAVA 6 update 20 or below, remove it then download Java again! Once download it will work. If it doesnt then thats your prob. If it works, go to [Add or Remove progams] and check if it is Java 6 Update 30. I hoped this helped You Java team for your answer + Any1 who had this problem


How do i fix my java problems for mac nothing java will load please help ASAP?

Im trying to play games like runescape etc , and download java files . for minecraft servers etc and my macintosh wont open any .jar files or !!!!!!!


When you click on free members click here on rune scape it keeps shutting down how do you fix this?

update your java.


What is a 'post fix expression' in java programming?

Postfix expressions are expressions where the operator is at the end of the expression. These include the "++" (increment) and "--" (decrement) operators. Most Java expressions use in-fix notation (e.g. "a + b") but the increment and decrement operators can be postfix ("e.g. "a++" to increment variable a) or even prefix (e.g. "++a").


How do you fix the bad video card error on minecraft?

Perform a windows update, and make sure you have the latest version of java


How can you fix uncaught exception java lang Null Pointer Exception on blackberry 8300?

The best way to fix uncaught exception java lang Null Pointer Exception on a Blackberry 8300 is by doing a restart. Shut the phone off and remove the battery for a minute. Replace the battery and turn the phone back on.


If Java breaks down how could it be fixed?

If Java breaks down, it could be fixed by using an emergency patch issued by Oracle. Although, it could take two years for Oracle to fix all the security flaws in the version of Java used to surf the web, recommendations state that the safest way to do at this point is just assume that Java is always going to be vulnerable.


What does JavaTM platform SE binary has stopped working mean?

This means that Java isn't responding. You can fix this by closing Minecraft, and then reopening it.


How do you fix java error popWindow is undefined?

Well you have to do a computer sweep type of thing.This happens to you because you have to many folders/data in your computer that gives you undefined java errors and may also start giving you pop-ups.Your computer may also have cookies which are files that give your computer viruses. Try and that will help you fix it.


Why does runescape have x in top left corner and how do you fix it?

It means you either don't have Java installed, or you have a previous version of Java that needs updating. You can visit www.Java.com to update/ install java. You can also play Runescape by switching from High Detail to Low Detail. Perhaps your processor can't handle HD.