---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 9 Edition"
java_version: 9
chapter: "Chapter 5. Loading, Linking, and Initializing"
section: "5.3.3"
heading: "5.3.3. Creating Array Classes"
parent: "5.3. Creation and Loading"
source: https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-5.html#jvms-5.3.3
id: "5.3.3"
url: https://jvm.obfuscated.software/jvms/se9/5.3.3.html
raw: https://jvm.obfuscated.software/jvms/se9/5.3.3.md
---

# 5.3.3. Creating Array Classes

The following steps are used to create the array class C denoted by `N` using class loader `L`. Class loader `L` may be either the bootstrap class loader or a user-defined class loader.

If `L` has already been recorded as an initiating loader of an array class with the same component type as `N`, that class is C, and no array class creation is necessary.

Otherwise, the following steps are performed to create C:

1. If the component type is a `reference` type, the algorithm of this section ([§5.3](5.3.md)) is applied recursively using class loader `L` in order to load and thereby create the component type of C.

2. The Java Virtual Machine creates a new array class with the indicated component type and number of dimensions.

   If the component type is a `reference` type, C is marked as having been defined by the defining class loader of the component type. Otherwise, C is marked as having been defined by the bootstrap class loader.

   In any case, the Java Virtual Machine then records that `L` is an initiating loader for C ([§5.3.4](5.3.4.md)).

   If the component type is a `reference` type, the accessibility of the array class is determined by the accessibility of its component type. Otherwise, the accessibility of the array class is `public`.
