In each case click the single most appropriate response. Only the correct response will register in the radio button.

What is the purpose of garbage collection?

retrieve memory that is no longer in use
gather terminated methods into one area in memory
store old values for variables that have been changed
backup the stack to the heap
backup the heap to the stack

When does garbage collection occur?

whenever the developer initiates it
at regular scheduled intervals
whenever a method exits
whenever a class constructor is called
whenever the JVM decides it should

If overriding equals method, should also ...

implement equalsIgnoreCase method
overload hashcode method
override hashcode method
implement Comparable interface
overload equals method

An object consists of ...

classes and messages
attributes and variables
methods and classes
variables and methods
classes and interfaces

Keyword used to instantiate object of a class ...

static
new
object
assert
instantiate

How can you reference instance variables?

using the static keyword
using dot notation
using the new keyword
using the = operator
instance variables can't be referenced

Keyword to create new class that inherits from another

extends
implements
inherits
super
is-a

Allow access to a member of a superclass from subclass?

new
extends
implements
sub
super

Purpose of overridding a method?

replace a subclass method in the superclass
replace a superclass method in the subclass
to extend the subclass
to mark the superclass as final
to mark the subclass as final

Class from which all Java classes are utimately derived?

Super
Sub
Window
Object
Class

Wrong answers so far:

top