Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaescape analysis scalar replacementSingle-choice MCQ

Escape analysis distinguishes 'NoEscape', 'ArgEscape', and 'GlobalEscape'. Which classification does the array x receive in this method, and what optimization does it permit?

int run() { int[] x = new int[2]; x[0] = 1; x[1] = 2; return helper(x); // helper not inlined }