Set - 6

Question 56 :

What interface must an object implement before it can be written to a stream as an object?

Answer :

An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.


Question 57 :

How are this and super used?

Answer :

this is used to refer to the current object instance. super is used to refer to the variables and methods of the superclass of the current object instance.


Question 58 :

What is the purpose of garbage collection?

Answer :

The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources may be reclaimed and reused.


Question 59 :

What is a compilation unit?

Answer :

A compilation unit is a Java source code file.


Question 60 :

What interface is extended by AWT event listeners?

Answer :

All AWT event listeners extend the java.util.EventListener interface.