Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //which of the lines of code on the right, if added to the class on the left at point A,
- //would cause eactly one additional object to be eligible
- public class GC {
- public static GC dostuff();
- GC newGC = new GC();
- doStuff2(newGC);
- return newGC;
- }
- public static void main(String [] args) {
- GC gc1;
- GC gc2 = new GC();
- GC gc3 = new GC();
- GC gc4 = gc3;
- gc1 = doStuff();
- // call more methods
- gc2 = null;
- gc1 = null;
- gc1 = gc4;
- }
- public static void doStuff2(GC copy GC) {
- GC localGC
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement