---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 9 Edition"
java_version: 9
chapter: "Chapter 6. The Java Virtual Machine Instruction Set"
section: "6.5.lstore_n"
heading: "lstore_<n>"
parent: "6.5. Instructions"
source: https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-6.html#jvms-6.5.lstore_n
id: "6.5.lstore_n"
url: https://jvm.obfuscated.software/jvms/se9/6.5.lstore_n.html
raw: https://jvm.obfuscated.software/jvms/se9/6.5.lstore_n.md
---

# lstore\_\<n>

## Operation

Store `long` into local variable

## Format

```
lstore_<n>
```

## Forms

*lstore_0* = 63 (0x3f)

*lstore_1* = 64 (0x40)

*lstore_2* = 65 (0x41)

*lstore_3* = 66 (0x42)

## Operand Stack

..., *value* →

...

## Description

Both <*n*> and <*n*>+1 must be indices into the local variable array of the current frame ([§2.6](2.6.md)). The *value* on the top of the operand stack must be of type `long`. It is popped from the operand stack, and the local variables at <*n*> and <*n*>+1 are set to *value*.

## Notes

Each of the *lstore\_\<n>* instructions is the same as *lstore* with an *index* of <*n*>, except that the operand <*n*> is implicit.
