In the below Java Program, how many objects are eligible for garbage collection?



In the below Java Program, how many objects are eligible for garbage collection?..

Answer / nashiinformaticssolutions

In general, three items are acceptable for waste pickup; however, I am not familiar with the program.

When the program starts, the first object is generated, and when it ends, it is no longer required.

When the user enters their name, the second object is generated; it is no longer needed at the end of the application.

When the user enters their address, the third object is generated; it is no longer required at the end of the program.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).

0 Answers  


What is collections framework?

0 Answers  


What do you understand by looping in java? Explain the different types of loops.

0 Answers  


what is different between static and non static methods ,using example

2 Answers  


What is the use of hashmap in java?

0 Answers  


What do u mean by method and also contructer in java ?

3 Answers  


java is pure object-oriented programming language?why it is platform independent.

1 Answers  


What is keyset in java?

0 Answers  


What is a vararg?

0 Answers  


abstract class A{ int list []=new int [100]; A(int x,int y){ rondom n=new rondom(); for (int i==;i<100;i++); list [i]=x+r.next int(y-x+1); abstract sort (); abstract binary sarch(int temp); class B extends A{

3 Answers  


Can you start a thread twice in Java?

0 Answers  


Which variables are stored in stack?

0 Answers  


Categories