kenny_yan
发贴: 3
积分: 0
|
于 2004-06-17 20:14
1. public class TestA { 2. TestB b; 3. TestA() { 4 b = new TestB(this); 5 } 6 } 7public class TestB { 8 TestA a; 9 TestB(TestA a) { 10 this.a = a; 11 } 12} 13public class TestAll { 14 public static void main(String[] args) { 15 new TestAll().makeThings(); 16 } 17 18 void makeThings() { 19 TestA test = new TestA(); 20 } 21} which two statement are true after line 15, before main complete(choose two) a. Line 15 will casuse a stack flow b. Exception throws at run time. c. The object referebced by a is eligible for garbage collection d. The object referebced by b is eligible for garbage collection e. The object referebced by a is not eligible for garbage collection f. The object referebced by b is not eligible for garbage collection Answer C,F
|