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

Is java a digit method?

0 Answers  


Name four container classes.

0 Answers  


What is the Scope of Static Variable?

0 Answers   Verifone,


What does function identity () do?

0 Answers  


explain copyonwritearraylist and when do we use copyonwritearraylist?

0 Answers  






What is palindrome in java?

0 Answers  


String is a immutable objects . it means that string does not change........... But it will be chang......... { String s="kapil"; String s1="raj"; String s=s1; then print(.......) The String has been changed .. how it is possible and why its called immutable objects

7 Answers  


Is finalize() similar to a destructor?

0 Answers  


What is printwriter in java?

0 Answers  


What are access modifiers?

1 Answers   Infosys,


What class allows you to read objects directly from a stream in java programming?

0 Answers  


What is a lambda expression ? What's its use ?

0 Answers  


Categories