多选题 Given:
3. public class BigData {
4. static BigData bd;
5. public static void main(String[] args) {
6. new BigData().doStuff();
7. // do lots of memory intensive stuff
... // JVM finds an eligible BigData object for GC
... // JVM invokes finalize()
... // do more stuff
48. }
49. void doStuff() { }
50. // insert code here
51. bd = this;
52. }
53. }
54. class MyException extends Exception { }
and the following four fragments:
Ⅰ. protected void finalize() throws Throwable {
Ⅱ. protected void finalize() {
Ⅲ. protected void finalize() throws MyException {
Ⅳ. void finalize() {
If the fragments are inserted, independently, at line 50, which are true? (Choose all that apply.)
【正确答案】 A、B、C
【答案解析】