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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we override tostring method in java?

585


What is the difference between procedural and object-oriented programs?

608


What is proper subset?

637


What's the base class of all exception classes?

644


What is variable length arguments in java?

613






how can i use a nonsynchronized hashtable?

2202


What is the difference between the size and capacity of a vector?

644


Which package is used for pattern matching with regular expressions?

726


What exactly is methodology?

567


How do you convert string to int in java?

639


What is difference between static and abstract class?

600


What are accessor methods in java?

628


Can I learn java without any programming experience?

668


Is java 1.7 the same as java 7?

647


What is the difference between access specifiers and access modifiers in java? 16

619