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

What is a finally block? Is there a case when finally will not execute?

0 Answers  


what is the difference between Java Command Line and C command Line?

2 Answers  


What is java used for?

0 Answers  


How to excute - Interface - Inner class- method can any one tell how to execute/ call this main method public interface abc { static int i=0; void dd(); class a1 { a1() { int j; System.out.println("inside"); }; public static void main(String a1[]) { System.out.println("in interfia"); } } }

1 Answers  


How does singleton class work?

0 Answers  






What is assembly language?

0 Answers  


What are the two main uses of volatile in Java?

0 Answers  


Why do we need variables?

0 Answers  


What is the purpose of finalization?

4 Answers  


Does hashset allow duplicates in java?

0 Answers  


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

1 Answers  


How do you delete a list in java?

0 Answers  


Categories