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

# lstore

## Operation

Store `long` into local variable

## Format

```
lstore
index
```

## Forms

*lstore* = 55 (0x37)

## Operand Stack

..., *value* →

...

## Description

The *index* is an unsigned byte. Both *index* and *index*+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 *index* and *index*+1 are set to *value*.

## Notes

The *lstore* opcode can be used in conjunction with the *wide* instruction ([§*wide*](6.5.wide.md)) to access a local variable using a two-byte unsigned index.
