# Common Errors

Out-of-Bounds Error

This is what you’ll get when trying to access an element, “slot,” or index that doesn’t exist.

### &#xD;Quick fix:&#xD;

1. Print the length of an array:

```java
println(arrayName.length);
```

2\. Make sure the index you are trying to access is LESS THAN the length.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hopemoore.gitbook.io/coding-for-creatives-spring-2021/glossary-and-terms/arrays/common-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
