Computer Science, asked by radhikark438, 18 days ago

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

Answers

Answered by XxflirtyqueenxX
0

Answer:

can u pls tell the question properly

Similar questions