What happens when you invoke a thread's interrupt method while it is sleeping or waiting?
When a task's interrupt() method is executed, the task enters the ready state. The next time the task enters the running state, an InterruptedException is thrown.
What is the return type of a program's main() method?
A program's main() method has a void return type.
Name four Container classes.
Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane
What is the difference between a Choice and a List?
A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices. Only one item may be selected from a Choice. A List may be displayed in such a way that several List items are visible. A List supports the selection of one or more List items.
What class of exceptions are generated by the Java run-time system?
The Java runtime system generates RuntimeException and Error exceptions.
What class allows you to read objects directly from a stream?
The ObjectInputStream class supports the reading of objects from input streams.
What is the difference between a field variable and a local variable?
A field variable is a variable that is declared as a member of a class. A local variable is a variable that is declared local to a method.
Under what conditions is an object's finalize() method invoked by the garbage collector?
The garbage collector invokes an object's finalize() method when it detects that the object has become unreachable.
How are this () and super () used with constructors?
this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.
What is the relationship between a method's throws clause and the exceptions that can be thrown during the method's execution?
A method's throws clause must declare any checked exceptions that are not caught within the body of the method