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

# fstore

## Operation

Store `float` into local variable

## Format

```
fstore
index
```

## Forms

*fstore* = 56 (0x38)

## Operand Stack

..., *value* →

...

## Description

The *index* is an unsigned byte that must be an index 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 `float`. It is popped from the operand stack, and the value of the local variable at *index* is set to *value*.

## Notes

The *fstore* 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.
