Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error Question

 
Allan Newman
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 21498
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Henry Wong
author
Marshal
Pie
Posts: 21498
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic