Question: Stack heap questions 5. (16 points) (either 2 or 4 points each, look below for individual section points) Answer some questions about the following Java
5. (16 points) (either 2 or 4 points each, look below for individual section points) Answer some questions about the following Java program; use the line numbers to identify particular state ments or variables. Assume that Widget is a valid class defined in some other file. 1 public class Midi ( 2 public int p, q: // instance variables 3 4 public void funci(int x, int y) ( 5 int p,q 6 7 String S; p=3*25 + x; 9 10 11 public int func20 t 12 p=50; 13 14 Widget w = new Widget(); q = 100; 15 func1 (p.g) w=new Widget(); return 3141; 16 17 18 19 (a) (2 points) Identify a statement where an optimization is likely to occur during the com- pilation process (b) (2 points) Identify an example of a name binding that has a hole in its scope
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
