Set - 4

Question 41 :

What are wrapper classes?

Answer :

Wrapper classes are classes that allow primitive types to be accessed as objects.


Question 42 :

Does garbage collection guarantee that a program will not run out of memory?

Answer :

Garbage collection does not guarantee that a program will not run out of memory. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection.


Question 43 :

What restrictions are placed on the location of a package statement within a source code file?

Answer :

A package statement must appear as the first line in a source code file (excluding blank lines and comments).


Question 44 :

Can an object's finalize() method be invoked while it is reachable?

Answer :

An object's finalize() method cannot be invoked by the garbage collector while the object is still reachable. However, an object's finalize() method may be invoked by other objects.


Question 45 :

What is the immediate superclass of the Applet class?

Answer :

Panel