Why are there two instructions ldc and ldc w for pushing a c

Why are there two instructions (ldc and ldc w) for pushing a constant value on top of the runtime stack?

Solution

LDC:

Format


ldc
index

=================

LDC_W

Format:

ldc_w
indexbyte1
indexbyte2

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

Why are there two instructions (ldc and ldc w) for pushing a constant value on top of the runtime stack?SolutionLDC: Format ldc index ================= LDC_W Fo

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site