posted 18 years ago
I have an out-of-bounds exception using an ArrayList, and I have the feeling that if I understood how to read the error message I could fix the problem more easily. Part of the list of calls reads
at java.util.ArrayList.get(Unknown Source)
Does 'unknown source' refer to a parameter, to the object on which I'm calling "get", or to the file that the class is in? It seems like it must be the last, since what usually goes in the parantheses is a file and line number. But if the JVM (?) understands ArrayList, why does it not also understand ArrayList.get(num)?
Thanks in advance! Karen.
ps now I have figured out that the error was because I tried to get item 1 from an array of length 1 -- C programming habits... but I still don't understand where the "Unknown Source" comes from.
[ August 26, 2005: Message edited by: Karen Nelson ]