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

# iinc

An *iinc* instruction with first operand `Index` is type safe iff `L_{Index}` has type `int`. The *iinc* instruction does not change the type state.

```
instructionIsTypeSafe(iinc(Index, _Value), _Environment, _Offset,
                      StackFrame, StackFrame, ExceptionStackFrame) :-
    StackFrame = frame(Locals, _OperandStack, _Flags),
    nth0(Index, Locals, int),
    exceptionStackFrame(StackFrame, ExceptionStackFrame).
```
