# Array

A fixed-size, indexed collection whose elements all have the same type.

## What is **Array** in Java?

**Array** — A fixed-size, indexed collection whose elements all have the same type.

```java
class Route {
    String[] stops = {"Oak", "Pine", "Lake"};
    String secondStop = stops[1];
    int stopCount = stops.length;
}
```

Level: Apprentice · [More Java terms at this level](https://www.ask-codey.com/glossary/subjects/java/apprentice)

Updated: September 27, 2026

## In other subjects

- [Array in C#](https://www.ask-codey.com/glossary/array-c-sharp)
- [Array in JavaScript](https://www.ask-codey.com/glossary/array-javascript-2)

Source: https://www.ask-codey.com/glossary/array
