---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 20 Edition"
java_version: 20
chapter: "Chapter 4. The class File Format"
section: "4.4.1"
heading: "4.4.1. The CONSTANT_Class_info Structure"
parent: "4.4. The Constant Pool"
source: https://docs.oracle.com/javase/specs/jvms/se20/html/jvms-4.html#jvms-4.4.1
id: "4.4.1"
url: https://jvm.obfuscated.software/jvms/se20/4.4.1.html
raw: https://jvm.obfuscated.software/jvms/se20/4.4.1.md
---

# 4.4.1. The `CONSTANT_Class_info` Structure

The `CONSTANT_Class_info` structure is used to represent a class or an interface:

```
CONSTANT_Class_info {
    u1 tag;
    u2 name_index;
}
```

The items of the `CONSTANT_Class_info` structure are as follows:

- **tag**

  The `tag` item has the value `CONSTANT_Class` (7).

- **name_index**

  The value of the `name_index` item must be a valid index into the `constant_pool` table. The `constant_pool` entry at that index must be a `CONSTANT_Utf8_info` structure ([§4.4.7](4.4.7.md)) representing a valid binary class or interface name encoded in internal form ([§4.2.1](4.2.1.md)).

Because arrays are objects, the opcodes *anewarray* and *multianewarray* - but not the opcode *new* - can reference array "classes" via `CONSTANT_Class_info` structures in the `constant_pool` table. For such array classes, the name of the class is the descriptor of the array type ([§4.3.2](4.3.2.md)).

For example, the class name representing the two-dimensional array type `int[][]` is `[[I`, while the class name representing the type `Thread[]` is `[Ljava/lang/Thread;`.

An array type descriptor is valid only if it represents 255 or fewer dimensions.
