---
spec: JLS
title: "The Java Language Specification"
edition: "Java SE 17 Edition"
java_version: 17
chapter: "Chapter 10. Arrays"
section: "10.3"
heading: "10.3. Array Creation"
parent: "Chapter 10. Arrays"
source: https://docs.oracle.com/javase/specs/jls/se17/html/jls-10.html#jls-10.3
id: "10.3"
url: https://jvm.obfuscated.software/jls/se17/10.3.html
raw: https://jvm.obfuscated.software/jls/se17/10.3.md
---

# 10.3. Array Creation

An array is created by an array creation expression ([§15.10.1](15.10.1.md)) or an array initializer ([§10.6](10.6.md)).

An array creation expression specifies the element type, the number of levels of nested arrays, and the length of the array for at least one of the levels of nesting. The array's length is available as a `final` instance variable `length`.

An array initializer creates an array and provides initial values for all its components.
