Question: For the code below, where are the variables and objects stored in the memory? Pick the answer for the following: (1) array that x is

For the code below, where are the variables and objects stored in the memory? Pick the answer for the following: (1) array that x is pointing to, (2) integer variable y, and (3) integer variable z. public class Problem { public static void foo() { int z = 5; System.out.println(z); public static void main(String[] args){ int[] x = {1,2,3,4,5}; int y = 5; foo(); } (1) , (2) eap, (3) Stack (1) Heap, (2) Stack, (3) Stack (1) , (2) Stack, (3) p O (1) Stack, (2) Heap, (3) Stack
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
