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?





Write Comment

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

Comments

Tags
Show Similar Question And Answers
QA->Idiom of Null and void....
QA->The collection of poem that madeSugathakumari eligible for Saraswati Samman?....
QA->All physically handicapped employees eligible to claim conveyance allowance are eligible for how many days of leave or treatment of illness connected with the physical handicap of the employee:....
QA->Name the first human-made object to cross out of the Solar System and into interstellar space?....
QA->In linked list START=NULL condition occurs in :....
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
DMCA.com Protection Status Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions