Q151. How can the Checkbox
class be used to create a radiobutton?
By associating Checkbox objects with a CheckboxGroup.
Q152. Which non-Unicode letter characters may be used asthe first character of an identifier?
The non-Unicode letter characters $ and _ may appear as the first character of an identifier
Q153. What restrictions are placed on method overloading?
Two methods may not have the same name and argument list but different return types.
Q154. What happens when you invoke a thread's interruptmethod 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.
Q155. What is casting?
There are two types of casting, casting between primitive numeric types and casting between
object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference.
Q156. What is the return type of a program's main()method?
A program's main() method has a void return type.
Q157. Name four Container classes.
Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane
Q158. 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.
Q159. What class of exceptions are generated by the Javarun-time system?
The Java runtime system generates RuntimeException and Error exceptions.
Q160. What class allows you to read objects directly from astream?
The ObjectInputStream class supports the reading of objects from input streams.
By associating Checkbox objects with a CheckboxGroup.
Q152. Which non-Unicode letter characters may be used asthe first character of an identifier?
The non-Unicode letter characters $ and _ may appear as the first character of an identifier
Q153. What restrictions are placed on method overloading?
Two methods may not have the same name and argument list but different return types.
Q154. What happens when you invoke a thread's interruptmethod 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.
Q155. What is casting?
There are two types of casting, casting between primitive numeric types and casting between
object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference.
Q156. What is the return type of a program's main()method?
A program's main() method has a void return type.
Q157. Name four Container classes.
Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane
Q158. 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.
Q159. What class of exceptions are generated by the Javarun-time system?
The Java runtime system generates RuntimeException and Error exceptions.
Q160. What class allows you to read objects directly from astream?
The ObjectInputStream class supports the reading of objects from input streams.
No comments:
Post a Comment