File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Error Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error Question" Watch "Error Question" New topic
Author

Error Question

Allan Newman
Greenhorn

Joined: Mar 06, 2006
Posts: 10
What does this mean?

Exception in thread "main" java.jang.ArrayIndexOutOfBoundsException: 1
at Stats.<init>(Stats.java:64)
at Stats.main(Stats.java:109)

Stats is the name of the program.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18542
    
  40

Originally posted by Allan Newman:
What does this mean?

Exception in thread "main" java.jang.ArrayIndexOutOfBoundsException: 1
at Stats.<init>(Stats.java:64)
at Stats.main(Stats.java:109)

Stats is the name of the program.


It means... somewhere around line 64 of the Stats.java file, during construction of a class, it tried to access the index 1 of an array, that does not have an index 1.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18542
    
  40

BTW, without looking at code, we can only guess at the problem. However, here is my guess.

I am guessing that you are trying to access the first and only item of an array, and forgot that arrays are zero based in Java. The first item has an index of zero.

Henry
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error Question
 
Similar Threads
RoR Vs Python+Zope Vs J2EE
INSTANT-MIX IMPERIAL DEMOCRACY buy one, get one free
A tale of two Rookies
Word game - 2
Writing to a JTextArea