Set - 7

Question 11 :

Can an unreachable object become reachable again?

Answer :

An unreachable object may become reachable again. This can happen when the object's finalize() method is invoked and the object performs an operation which causes it to become accessible to reachable objects.

Question 12 :

When is an object subject to garbage collection?

Answer :

An object is subject to garbage collection when it becomes unreachable to the program in which it is used.

Question 13 :

What method must be implemented by all threads?

Answer :

All tasks must implement the run() method, whether they are a subclass of Thread or implement the Runnable interface.

Question 14 :

What methods are used to get and set the text label displayed by a Button object?

Answer :

getLabel() and setLabel()

Question 15 :

Which Component subclass is used for drawing and painting?

Answer :