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

Escape analysis enables scalar replacement. For the code below, what does C2 most plausibly do after escape analysis, and why?

int dist() { Point p = new Point(3, 4); return p.x + p.y; }