-
Can an exception be rethrown
Yes, an exception can be rethrown.
-
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.
-
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.
-
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 state is a thread in when it is executing
An executing thread is in the running state.
-
-
What is the difference between a public and a non-public class
A public class may be accessed outside of its package. A non-public class may not beaccessed outside of its package.
-
What is the purpose of a statement block
A statement block is used to organize a sequence of statements as a single statementgroup.
-
What methods are used to get and set the text label displayed by a Button object
getLabel() and setLabel()
-
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 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 listof available choices. Only one item may be selected from a Choice. A List may bedisplayed in such a way that several List items are visible. A List supports the selectionof one or more List items.
-
What an I/O filter
An I/O filter is an object that reads from one stream and writes to another, usuallyaltering the data in some way as it is passed from one stream to another.
-
What is the Set interface
The Set interface provides methods for accessing the elements of a finite mathematicalset. Sets do not allow duplicate elements.
-
What are E and PI
E is the base of the natural logarithm and PI is mathematical value pi.
-
What class allows you to read objects directly from a stream
The ObjectInputStream class supports the reading of objects from input streams.
-
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 happens when you add a double value to a String
The result is a String object.
-
What is the List interface
The List interface provides support for ordered collections of objects.
Java Interview Questions
Ans