Answers for "what is garbage collection in java when it is invoked how does it work"

2

garbage collection in java

public class Test
{
    public static void main(String [] args) 
    {
        Test t1 = new Test();
        Test t2 = m1(t1); // line 6
        Test t3 = new Test();
        t2 = t3; // line 8
          
    }
      
    static Test m1(Test temp) 
    {
        temp = new Test();
        return temp;
    }
}
Posted by: Guest on February-18-2022

Code answers related to "what is garbage collection in java when it is invoked how does it work"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language