1.

Q. What is the output for the below programpublic class Test{public static void main(String[] args) throws InterruptedException{String str = new String("GeeksForGeeks");// making str eligible for gostr = null;// calling garbage collectorSystem.gc();// waiting for gc to completeThread.sleep(1000);System.out.println("end of main");}@Overrideprotected void finalize(){System.out.println("finalize method called");}}​

Answer»

Answer:

can u PLS tell the question PROPERLY



Discussion

No Comment Found