Question: 7. Consider the program segment below and answer the boolean questions below: (10 points) public static String doWell (String p) String s = apple, String
7. Consider the program segment below and answer the boolean questions below: (10 points) public static String doWell (String p) String s = "apple", String t = s+p; return t String ret doWell ("pear"); line 10 After call to doWell in line 10, (0) object referenced by s is garbage collected (ii) object referenced by t is garbage collected (ii)i s in the method is dereferenced (iv) t in the method is dereferenced
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
