Monday, August 2, 2010

What is the purpose of the File class?

The File class is used to create objects that provide access to the files and directories of a local file system.

Can an exception be rethrown?

Yes, an exception can be rethrown.

Which Math method is used to calculate the absolute value of a number?

The abs() method is used to calculate absolute values.

How does multithreading take place on a computer with a single CPU?

The operating system's task scheduler allocates execution time to multiple tasks. By quickly switching between executing tasks, it creates the impression that tasks execute sequentially.

When does the compiler supply a default constructor for a class?

The compiler supplies a default constructor for a class if no other constructors are provided.

When is the finally clause of a try-catch-finally statement executed?

The finally clause of the try-catch-finally statement is always executed unless the thread of execution terminates or an exception occurs within the execution of the finally clause.

Which class is the immediate superclass of the Container class?

Componentz

If a method is declared as protected, where may the method be accessed?

A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared

How can the Checkbox class be used to create a radio button?

By associating Checkbox objects with a CheckboxGroup.

Which non-Unicode letter characters may be used as the first character of an identifier?

The non-Unicode letter characters $ and _ may appear as the first character of an identifier