Java code shows error when trying to debug

Asked By 10 points N/A Posted on -
qa-featured

Hello,

I have two ArrayList in a position of selected images but I am unable to delete these selected images. It works fine when I run the code in debug mode but I get the following error message when I run it in normal mode. It gives me the following exception error message. I am looking for an expert’s advice so help me to resolve this issue. I would be grateful to you for any kind of assistance. I am running Win XP SP2. Thanks.

Error

Java.lang.IndexOutOfBoundsException

Indes: 3, Size:3

Java.util. ArrayList.RangeCheck(Unknown Source)

Java.util. ArrayList.getCheck(Unknown Source)

Deadbeef. SupTools. SubPictureBD.getImageWidth(SubPicture.Java:238)

Deadbeef.SupTools.SupBD.(supbD.java:192

Deadbeef.SupTools.Core.readSup(Core;java:1183)

Deadbeef.SupTools.Core.run(Core;java:718)

Java.lang.Thread.run(Unknown Source)

SHARE
Answered By -10 points N/A #177336

Java code shows error when trying to debug

qa-featured

The reason for this error is clearly shown in the message ”Array Index Out of bound exception”, This type of error occurs when you create an array of size n and later you try to access the location n+1, This type of things will not give any error in C but in java it will show an exception. Try checking the code, Look for any use of nth index when starting the array from 0 or n+1 index when stating the array from 1 

Related Questions