Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6010707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:09:19+00:00 2026-05-23T02:09:19+00:00

java.lang.IndexOutOfBoundsException: Index: 1365, Size: 1365 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at com.Engine.write(Engine.java:114) at

  • 0
java.lang.IndexOutOfBoundsException: Index: 1365, Size: 1365
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.Engine.write(Engine.java:114)
at com.Engine.read(Engine.java:90)
at com.Engine.main(Engine.java:19)

I understand that my array is out of bounds, but what does the

Index: 1365, Size: 1365

indicate?

And how could I go by fixing this? Just increase the size of my array?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:09:19+00:00Added an answer on May 23, 2026 at 2:09 am

    -Size is the size of the array(Amount of elements that can hold).

    -Index is the location that you were trying to access.

    NOTE 1: Since the first index is 0, you where trying to access 1+ the maximim of the array so that is why you got that exception

    FIX OPTION 1

    To fix this exception in the case you are using a loop to manipulate the elements you could do something like this:

    for(int i = 0; i < array.length; i++) {
       array[i].doSomething();
    }
    

    FIX OPTION 2

    As you said increasing the size would be another option. You just need to do something like this:

    MyArray[] ma =  new MyArray[1366];
    

    BUT
    That would be not very flexible, in case you want to increase it again in the future. So another option to avoid something like this would be to use a bit more advanced data structure or collection, like a List, because they automatically get increase when in needed.
    See more information about data structures here: http://tutorials.jenkov.com/java-collections/index.html

    Example 1 creation:

    List<MyObject> myObjects =  new ArrayList<MyObject>();
    

    Example 2 iteration:

     for(MyObject mo : myObjects) {
         MyObject tmpValue = mo;
        mo.doSomething();  
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the stack trace: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:257)
**How to solve this ERROR/AndroidRuntime(328): Caused by: java.lang.IndexOutOfBoundsException: Invalid index 10, size is 10
Why java.lang.IndexOutOfBoundsException is raised in this example, if the size of ArrayList has been
ERROR: reference to IndexOutOfBoundsException is ambiguous, both class com.sun.star.lang.IndexOutOfBoundsException in com.sun.star.lang and class java.lang.IndexOutOfBoundsException
I get a java.lang.NoClassDefFoundError: com/hp/hpl/jena/shared/BadURIException when running a very simple servlet. The error points
I am getting: FATAL: Bounds exceeds available space : size=262144, offset=262145 java.lang.IndexOutOfBoundsException: Bounds exceeds
I'm writing a basic java card game but I'm getting a java.lang.IndexOutOfBoundsException: Index: 6,
I get java.lang.IndexOutOfBoundsException , when I call replaceAll() with replacement text containing $1 :
Why is java.lang.Thread in the Google App Engine whitelist when it is not supported?
I get a java.lang.outOfMemoryError exception, while writing a big file to the servletOutputStream. Every

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.