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 |
What is a finally block? Is there a case when finally will not execute?
what is the difference between Java Command Line and C command Line?
What is java used for?
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"); } } }
How does singleton class work?
What is assembly language?
What are the two main uses of volatile in Java?
Why do we need variables?
What is the purpose of finalization?
Does hashset allow duplicates in java?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
How do you delete a list in java?