# Array Initializer

A brace-enclosed list of values used to fill an array when it is created.

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

**Array Initializer** — A brace-enclosed list of values used to fill an array when it is created.

```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 Initializer in C#](https://www.ask-codey.com/glossary/array-initializer-c-sharp)

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