Java MCQ
Java MCQ
1) a. b. c. d. 2) The various controls supported by AWT are Labels, push buttonss Checkboxes, choice, list Scroll bars, text area, text field All of these The concept of the menu bar canbe implemented by using three java classes
a. b. c. d.
3)
a. b. c. d. e.
4) a. b. c. d. 5)
The constructor which the Text Event class defines. TextEvent(Object source, int event_type) textevent (Object source, int event_type) textevent (object Source, float event_type) textevent (Object source, string event_type) In Java an event is an _______which specifies the change of state in the source.
a. b. c. d.
6) a. b. c. d. e. f. 7)
The name of the event classes are ActionEvent, ComponentEvent ContainerEvent, FocusEvent ItemEvent, KeyEvent WindowListener, MouseEvent TextEvent All of these The classes and interfaces defined in AWT are contained within the ______ package.
a. b. c. d.
8)
a. b. c. d.
9) a. b. c. d. 10) a. b. c. d. e. f. 11)
The general form to set a specific type of layout manager is void setLayout(LayoutManager lm) Void setLayout(LayoutManager lm) void setLayout(layoutManager lm) Void setLayout(Layoutmanager lm) Some of the event listener interfaces are_____________ ActionListener, ComponentListener ContainerListener, FocusListener ItemListener, KeyListener WindowListener, MouseListener TextListener All of these The AWT container is an instance of the ___________ class which holds various components and other containers
a. b. c. d.
a. b. c. d.
Combination of a small box A label Combination of a large box and a label Both a & b
a. b. c. d.
14) In Java, events are all the activities that occur between
a. b. c. d.
a. b. c. d.
Abstract Window Toolkit Abstract Window Toollayout Abstract Withdraw Tools Abstract Window Title
16) a. b. c. d. 17)
Till now, two models have been introduced in Java for Receiving and Processing events Deleting and Processing events Receiving and Deleting events Modifying and Receving events An event is generated whe the internal state of the event source is________
a. b. c. d.
a. b. c. d.
19) Positions the components into five regions:east, west, north, south, center
a. b. c. d.
20) Arranges the components as a deck of cards such that only one component is visible at a time
a. b. c. d.
a. b. c. d.
a. b. c. d.
a. b. c. d.
24) The Component class and MenuComponent class are the ___________ which represent the GUI components.
a.
Subclasses
b. c. d.
25) The Component class is an abstract class and so its ____________ are used to create components.
a. b. c. d.
e. 26) The AWT classes can be roughly categorized into the following groups:
a. b. c. d. e.
a. b. c. d.
a. b. c. d.
a. b. c. d.
a. b. c. d.
e. 31) The CardLayout class defines the following constructors: a. CardLayout() // First Cardlayout(int hor, int ver) //second b. Cardlayout() // First CardLayout(int hour, int ver) //second c. CardLayout() // First Cardlayout(int hor, int var) //second d. CardLayout() // First Cardlayout(int hour, int ver) //second 32) A menu bar represents a. A list of menus which can be added to the top of a top-level window b. A list of menus which can be deleted to the top of a top-level window c. A list of menus which can be added to the bottom of a bottom-level window d. None of these 33) Each menu is associated with a _________ list of menu items:
a. b. c. d.
a. b. c. d.
35) Regular menus are placed at the __________ of the application window within a menu bar
a. b.
Top Bottom
c. d.
Top-down Botttom-up
a. b. c. d.
e. 37) The text field and text area controls create a _________________ area respectively
a. b. c. d.
a. b. c. d.
a. b. c. d.
a. b. c. d.
a. b. c. d.
a. b. c. d.
a. b. c. d.
44) _____________ is a superclass of TextField and TextArea classes that is used to create single-line or multiline textfields respectively:
a. b. c. d.
a. b. c. d.
46) The Delegation Event Model defines a ______________ approach to handle events:
a.
Logical
b. c. d.
a. b. c. d.
48) A source generates an event and sends it to ___________ listeners that can handle the event:
a. b. c. d.
49) a. b. c. d. 50)
Applet is a small program written in the Java programming language that performs: A specific task May or may not be a part of a larger program Both a & b None of these _______ generates action events when an item is double-clicked, generate action events when an item is selected or deselected.
a. b. c. d.