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

# putstatic

A *putstatic* instruction with operand `CP` is type safe iff `CP` refers to a constant pool entry denoting a field whose declared type is `FieldType`, and one can validly pop a type matching `FieldType` off the incoming operand stack yielding the outgoing type state.

```
instructionIsTypeSafe(putstatic(CP), _Environment, _Offset, StackFrame,
                      NextStackFrame, ExceptionStackFrame) :-
    CP = field(_FieldClassName, _FieldName, FieldDescriptor),
    parseFieldDescriptor(FieldDescriptor, FieldType),
    canPop(StackFrame, [FieldType], NextStackFrame),
    exceptionStackFrame(StackFrame, ExceptionStackFrame).
```
