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

# ldc_w

## Operation

Push item from run-time constant pool (wide index)

## Format

```
ldc_w
indexbyte1
indexbyte2
```

## Forms

*ldc_w* = 19 (0x13)

## Operand Stack

... →

..., *value*

## Description

The unsigned *indexbyte1* and *indexbyte2* are assembled into an unsigned 16-bit index into the run-time constant pool of the current class ([§2.5.5](2.5.5.md)), where the value of the index is calculated as (*indexbyte1* `<<` 8) | *indexbyte2*. The index must be a valid index into the run-time constant pool of the current class. The run-time constant pool entry at the index must be loadable ([§5.1](5.1.md)), and not any of the following:

- A numeric constant of type `long` or `double`.
- A symbolic reference to a dynamically-computed constant whose field descriptor is `J` (denoting `long`) or `D` (denoting `double`).

If the run-time constant pool entry is a numeric constant of type `int` or `float`, or a string constant, then *value* is determined and pushed onto the operand stack according to the rules given for the *ldc* instruction.

Otherwise, the run-time constant pool entry is a symbolic reference to a class, interface, method type, method handle, or dynamically-computed constant. It is resolved and *value* is determined and pushed onto the operand stack according to the rules given for the *ldc* instruction.

## Linking Exceptions

During resolution of a symbolic reference, any of the exceptions pertaining to resolution of that kind of symbolic reference can be thrown.

## Notes

The *ldc_w* instruction is identical to the *ldc* instruction ([§*ldc*](6.5.ldc.md)) except for its wider run-time constant pool index.

The *ldc_w* instruction can only be used to push a value of type `float` taken from the float value set ([§2.3.2](2.3.2.md)) because a constant of type `float` in the constant pool ([§4.4.4](4.4.4.md)) must be taken from the float value set.
