---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 12 Edition"
java_version: 12
chapter: "Chapter 4. The class File Format"
section: "4.10.1.9.aload"
heading: "aload, aload_<n>"
parent: "4.10.1.9. Type Checking Instructions"
source: https://docs.oracle.com/javase/specs/jvms/se12/html/jvms-4.html#jvms-4.10.1.9.aload
id: "4.10.1.9.aload"
url: https://jvm.obfuscated.software/jvms/se12/4.10.1.9.aload.html
raw: https://jvm.obfuscated.software/jvms/se12/4.10.1.9.aload.md
---

# aload, aload\_\<n>

An *aload* instruction with operand `Index` is type safe and yields an outgoing type state `NextStackFrame`, if a load instruction with operand `Index` and type `reference` is type safe and yields an outgoing type state `NextStackFrame`.

```
instructionIsTypeSafe(aload(Index), Environment, _Offset, StackFrame,
                      NextStackFrame, ExceptionStackFrame) :-
    loadIsTypeSafe(Environment, Index, reference, StackFrame, NextStackFrame),
    exceptionStackFrame(StackFrame, ExceptionStackFrame).
```

The instructions *aload\_\<n>*, for 0 ≤ *n* ≤ 3, are type safe iff the equivalent *aload* instruction is type safe.

```
instructionHasEquivalentTypeRule(aload_0, aload(0)).
instructionHasEquivalentTypeRule(aload_1, aload(1)).
instructionHasEquivalentTypeRule(aload_2, aload(2)).
instructionHasEquivalentTypeRule(aload_3, aload(3)).
```
