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

# 4.4.6. The `CONSTANT_NameAndType_info` Structure

The `CONSTANT_NameAndType_info` structure is used to represent a field or method, without indicating which class or interface type it belongs to:

```
CONSTANT_NameAndType_info {
    u1 tag;
    u2 name_index;
    u2 descriptor_index;
}
```

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

- **tag**

  The `tag` item has the value `CONSTANT_NameAndType` (12).

- **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 either a valid unqualified name denoting a field or method ([§4.2.2](4.2.2.md)), or the special method name `<init>` ([§2.9.1](2.9.1.md)).

- **descriptor_index**

  The value of the `descriptor_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 field descriptor or method descriptor ([§4.3.2](4.3.2.md), [§4.3.3](4.3.3.md)).
