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

# iconst\_\<i>

## Operation

Push `int` constant

## Format

```
iconst_<i>
```

## Forms

*iconst_m1* = 2 (0x2)

*iconst_0* = 3 (0x3)

*iconst_1* = 4 (0x4)

*iconst_2* = 5 (0x5)

*iconst_3* = 6 (0x6)

*iconst_4* = 7 (0x7)

*iconst_5* = 8 (0x8)

## Operand Stack

... →

..., <*i*>

## Description

Push the `int` constant <*i*> (-1, 0, 1, 2, 3, 4 or 5) onto the operand stack.

## Notes

Each of this family of instructions is equivalent to *bipush* <*i*> for the respective value of <*i*>, except that the operand <*i*> is implicit.
