• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

understanding error messages

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it's just telling you the debug information about the class, such as line numbers and the actual source code, were not available to the runtime. If they had been available there would have been a little more info in the error.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am unable to duplicate your error.
reply
    Bookmark Topic Watch Topic
  • New Topic