Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavabytecode and operand stackSingle-choice MCQ

The JVM is a stack machine. Consider the bytecode below for evaluating an expression. What is the operand stack state immediately AFTER the imul executes?

// for: int r = (a + b) * c; with a=2, b=3, c=4 already in locals 0,1,2 iload_0 // a iload_1 // b iadd // a+b iload_2 // c imul // (a+b)*c