-
-
How are the elements of a CardLayout organized
The elements of a CardLayout are stacked, one on top of the other, like a deck of cards.
-
Is &&= a valid Java operator
No, it is not.
-
-
What is the relationship between clipping and repainting
When a window is repainted by the AWT painting thread, it sets the clipping regions tothe area of the window that requires repainting.
-
Is "abc" a primitive value
The String literal "abc" is not a primitive value. It is a String object.
-
What is the highest-level event class of the event-delegation model
The java.util.EventObject class is the highest-level class in the event-delegation classhierarchy.
-
What event results from the clicking of a button
The ActionEvent event is generated as the result of the clicking of a button.
-
How can a GUI component handle its own events
A component can handle its own events by implementing the required event-listenerinterface and adding itself as its own event listener.
-
What is the Collection interface
The Collection interface provides support for the implementation of a mathematical bag -an unordered collection of objects that may contain duplicates.
-
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 alocal 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 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 characterof an identifier
The non-Unicode letter characters $ and _ may appear as the first character of anidentifier
-
What restrictions are placed on method overloading
Two methods may not have the same name and argument list but different return types.
-
What happens when you invoke a thread's interrupt method while it issleeping or waiting
When a task's interrupt() method is executed, the task enters the ready state. The nexttime the task enters the running state, an InterruptedException is thrown.
-
What is casting
There are two types of casting, casting between primitive numeric types and castingbetween object references. Casting between numeric types is used to convert largervalues, such as double values, to smaller values, such as byte values. Casting betweenobject references is used to refer to an object by a compatible class, interface, or arraytype reference.
-
Java Interview Questions
Ans