Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Curious About IndexOutofBoundException

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Curious About IndexOutofBoundException

    Hi guys, I'm just wandering why IndexOutofBoundsException occurs? My error says, that exception in Animation thread after that is a Size:1, Index: 1... I had solved the problem but as I rerun my program many more times, it occurs again... any answer? and how would I be able to solve it?


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Curious About IndexOutofBoundException

    Arrays are numbered beginning with zero. So an array of size 1 has a single element whose index number is 0, not 1
    So an array with indices 0 1 2 3 has a size of 4
    More on the topic

Similar Threads

  1. Curious about newline and carriage return
    By IHeartProgramming in forum Java Theory & Questions
    Replies: 4
    Last Post: November 25th, 2012, 08:13 PM
  2. Replies: 1
    Last Post: June 28th, 2011, 01:20 AM
  3. Replies: 2
    Last Post: February 14th, 2011, 02:32 AM

Tags for this Thread