1. void start() { A a = new A(); B b = new B(); a.s(b); b = null; / Line 5 / a = null; / Line 6 / System.out.println("start completed"); / Line 7 / } When is the B object, created in line 3, eligible for garbage collection?





Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

Show Similar Question And Answers
QA->Null and void....
QA->The Shortcut key to start a new line without starting a new paragraph is....
QA->Age group of the people who were eligible under the `TRYSEM` system?....
QA->When an object travels around another object it is known as?....
QA->When an object is heated, the molecules of that object?....
MCQ->void start() { A a = new A(); B b = new B(); a.s(b); b = null; / Line 5 / a = null; / Line 6 / System.out.println("start completed"); / Line 7 / } When is the B object, created in line 3, eligible for garbage collection?....
MCQ->public Object m() { Object o = new Float(3.14F); Object [] oa = new Object[l]; oa[0] = o; / Line 5 / o = null; / Line 6 / oa[0] = null; / Line 7 / return o; / Line 8 / } When is the Float object, created in line 3, eligible for garbage collection?....
MCQ->What will be the output of the program? class Happy extends Thread { final StringBuffer sb1 = new StringBuffer(); final StringBuffer sb2 = new StringBuffer(); public static void main(String args[]) { final Happy h = new Happy(); new Thread() { public void run() { synchronized(this) { h.sb1.append("A"); h.sb2.append("B"); System.out.println(h.sb1); System.out.println(h.sb2); } } }.start(); new Thread() { public void run() { synchronized(this) { h.sb1.append("D"); h.sb2.append("C"); System.out.println(h.sb2); System.out.println(h.sb1); } } }.start(); } }....
MCQ->class Bar { } class Test { Bar doBar() { Bar b = new Bar(); / Line 6 / return b; / Line 7 / } public static void main (String args[]) { Test t = new Test(); / Line 11 / Bar newBar = t.doBar(); / Line 12 / System.out.println("newBar"); newBar = new Bar(); / Line 14 / System.out.println("finishing"); / Line 15 / } } At what point is the Bar object, created on line 6, eligible for garbage collection?....
MCQ->What will be the output of the program? class s1 extends Thread { public void run() { for(int i = 0; i < 3; i++) { System.out.println("A"); System.out.println("B"); } } } class Test120 extends Thread { public void run() { for(int i = 0; i < 3; i++) { System.out.println("C"); System.out.println("D"); } } public static void main(String args[]) { s1 t1 = new s1(); Test120 t2 = new Test120(); t1.start(); t2.start(); } }....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution