CONSTANT_Double tag 6
A double constant, loaded with ldc2_w.
- Tag
6- Since
- class file 45.0 (Java 1.0)
- Size
- 9 bytes
- Loadable
- yes, with
ldc2_w - Referred to by
- ldc2_w
- ConstantValue of double fields
Layout
| Type | Field | What it holds |
|---|---|---|
u1 | tag | 6 |
u4 | high_bytes | upper 32 bits of the IEEE 754 double |
u4 | low_bytes | lower 32 bits |
What it is for
A double constant, loaded with ldc2_w. 0.0 and 1.0 have dconst instructions.
Like Long, a Double takes two constant pool slots, and the index after it is unusable.
How common it is
JDK 25.0.5's java.base has 1,435 Double constants in 55 of its 7,391 classes: 0.14% of all 1,059,609 constants.
A real one, byte by byte
Constant #80 of Numbers.class, compiled by javac 25:
| Offset | Bytes | Field | Value |
|---|---|---|---|
| 685 | 9 bytes | #80 Double | 3.14159 |
| 685 | 06 | tag | 6 (Double) |
| 686 | 40 09 21 f9 | high_bytes | 1074340345 |
| 690 | f0 1b 86 6e | low_bytes | 4028335726 |
Specification: JVMS §4.4, CONSTANT_Double_info (Java SE 25).