---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 12 Edition"
java_version: 12
chapter: "Chapter 2. The Structure of the Java Virtual Machine"
section: "2.11.2"
heading: "2.11.2. Load and Store Instructions"
parent: "2.11. Instruction Set Summary"
source: https://docs.oracle.com/javase/specs/jvms/se12/html/jvms-2.html#jvms-2.11.2
id: "2.11.2"
url: https://jvm.obfuscated.software/jvms/se12/2.11.2.html
raw: https://jvm.obfuscated.software/jvms/se12/2.11.2.md
---

# 2.11.2. Load and Store Instructions

The load and store instructions transfer values between the local variables ([§2.6.1](2.6.1.md)) and the operand stack ([§2.6.2](2.6.2.md)) of a Java Virtual Machine frame ([§2.6](2.6.md)):

- Load a local variable onto the operand stack: *iload*, *iload\_\<n>*, *lload*, *lload\_\<n>*, *fload*, *fload\_\<n>*, *dload*, *dload\_\<n>*, *aload*, *aload\_\<n>*.
- Store a value from the operand stack into a local variable: *istore*, *istore\_\<n>*, *lstore*, *lstore\_\<n>*, *fstore*, *fstore\_\<n>*, *dstore*, *dstore\_\<n>*, *astore*, *astore\_\<n>*.
- Load a constant on to the operand stack: *bipush*, *sipush*, *ldc*, *ldc_w*, *ldc2_w*, *aconst_null*, *iconst_m1*, *iconst\_\<i>*, *lconst\_\<l>*, *fconst\_\<f>*, *dconst\_\<d>*.
- Gain access to more local variables using a wider index, or to a larger immediate operand: *wide*.

Instructions that access fields of objects and elements of arrays ([§2.11.5](2.11.5.md)) also transfer data to and from the operand stack.

Instruction mnemonics shown above with trailing letters between angle brackets (for instance, *iload\_\<n>*) denote families of instructions (with members *iload_0*, *iload_1*, *iload_2*, and *iload_3* in the case of *iload\_\<n>*). Such families of instructions are specializations of an additional generic instruction (*iload*) that takes one operand. For the specialized instructions, the operand is implicit and does not need to be stored or fetched. The semantics are otherwise the same (*iload_0* means the same thing as *iload* with the operand *0*). The letter between the angle brackets specifies the type of the implicit operand for that family of instructions: for *\<n>*, a nonnegative integer; for *\<i>*, an `int`; for *\<l>*, a `long`; for *\<f>*, a `float`; and for *\<d>*, a `double`. Forms for type `int` are used in many cases to perform operations on values of type `byte`, `char`, and `short` ([§2.11.1](2.11.1.md)).

This notation for instruction families is used throughout this specification.
