---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 22 Edition"
java_version: 22
chapter: "Chapter 4. The class File Format"
section: "4.9"
heading: "4.9. Constraints on Java Virtual Machine Code"
parent: "Chapter 4. The class File Format"
source: https://docs.oracle.com/javase/specs/jvms/se22/html/jvms-4.html#jvms-4.9
id: "4.9"
url: https://jvm.obfuscated.software/jvms/se22/4.9.html
raw: https://jvm.obfuscated.software/jvms/se22/4.9.md
---

# 4.9. Constraints on Java Virtual Machine Code

The code for a method, instance initialization method ([§2.9.1](2.9.1.md)), or class or interface initialization method ([§2.9.2](2.9.2.md)) is stored in the `code` array of the `Code` attribute of a `method_info` structure of a `class` file ([§4.7.3](4.7.3.md)). This section describes the constraints associated with the contents of the `Code_attribute` structure.

**Sections:**

- [4.9.1. Static Constraints](4.9.1.md)
- [4.9.2. Structural Constraints](4.9.2.md)
