Adv JAVA G Scheme
Adv JAVA G Scheme
(a) Component
Name of the class used to represent a GUI application
2 window, which is optionally resizable and can have a title
Window
bar, an icon, and menus.
50 ) Application Programming
API stands for ____
Infrastructure
56 56 Object which can store group of other object is known Java object
) Abstract Window B
(c) Abstract Writing Toolkit (d) All Window Tools
Toolkit
(c) getActionEvent() (b) getActionKeyO (d) getKeyO A
(b) You cannot place A
WT components on (c) A WT stands for
(d) The A WT Classes are D
Swing Abstract Window
deprecated.
containers Toolkit
(b) False A
(b) Java interpreter (c) Java compiler (d) Java debugger A
(b) Disassemble (c) Compiler (d) Debugger A
No A
printf (c) scanf (d) final D
(b) Java.io (c) Java.lang (d) Java.awt C
(c) stopt) ) initO (d) destroyO B
Java interpreter (c) Java compiler (d) Java disassemble A
No B
(b) It is in syntax (c) To create single copy
(d) None ofthe above
False A
(c) 2.0 1.7 (d) 1.6 B
No B
False A
(b) Association (c) Both (a) and (b) ( d) None ofthe above B
(b) user interactive (c) both (a) and (b) (d) none of the above C
A listener is a
variable that is
notified when an
5 What is a listener in context to event handling? event
occurs.
29 ___ ' method can be used to change location of an event. (a) ChangePointO
46 In Java, events are all the activities that occur between (a) The user
47 EventObject class belongs to : (a) java.util
The Component class is an abstract class and so its
48 _____ are used to create components. Subclasses
(a) TextEvent(Object
52 The constructor that is defined by the Text Event class is : source, int
event_type)
53 ActionEvent,
The name of the event classes are :
ComponentEvent
The event-
inheritance model
has replaced the
59 Which of the following are true? event-
delegation model.
A TextField object
63 Which of the following are true? may generate an
ActionEvent.
The MouseListener
interface defines
methods for
64 Which of the following are true? handling mouse
clicks.
What is the preferred way to handle an object's events in Override the object's
66 Java 2? handleEvent( )
method.
A component may
handle its own
events by adding
67 67 Which of the following are true? itself as an event
listener.
70 Receiving and
Till now, two models have been introduced in Java for:
Processing events
(c) java.event ) java.awt (d) java.awt.event D
An event is an An event is a
An event is an object
object that class used for
that describes any
describes a state defining object,
change by the A
change in to create'-
user and system.
processing. events.
(d)
(c) addKeyListener()addKistener() eventKeyboardLi C
stener()
(b) (c)
addMouseListener( addMouseMotionListne (d) eventMouseMotionListener C
) r()
A listener is a
A listener is a method
object that is
that is notified when
notified when an
an event None of the mentioned B
event
occurs.
occurs.
(d) C
getIDO getEventO
getEventObjectO
(d) A
(b) KeyEvent (c) WindowEvent
AdjustmentEvent
(b) (d)
getActionComman getActionEventComma getActionEvent() B
dO ndO
) All of the D
(c) SHIFT_MASK
mentioned
(b) B
(d) WindowEvent KeyEvent
AdjustmentEvent
(d)
(c) getAdjustmentTypeO
getEventTypeO getEventObjectT C
ypeO
(c) getAdjustmentValueO
getAdjustmentTypeO (d) getAdjustmentAmountO A
(b) (c)
COMPONENT_M COMPONENT_RESIZ , (d) All of the mentioned D
OVED E
(b) TEXT_FORMAT_CHANGED
(c) TEXT_VALVE_CHANGED
(d) TEXT_SIZE_CHANGED C
(d)
(c) B
(b) getWindowO getWindowObjec
getWindowEventO
tO
(b) Superclasses (c) Both (a) and (b) (d) None of these. A
(d) textevent
(b) textevent (c) textevent (object
(Object source, A
(Object source, int Source, float
string
event_type) event_type)
event_type)
(b) ContainerEvent, (c) ltemEvent, D
(d) All ofthese
FocusEvent KeyEvent
(d) C
(c) ActionListener (b) FocusListener
WindowListener
(d) D
(c) FocusListener (b) ltemListener
ActionListener
The event-
The event- The event-delegation
delegation
inheritance model model uses event
model uses the
is more efficient listeners to
handleEvent(
than the define the methods of C
method to
event-delegation event-handling
support event
model. classes.
handling.
(b)
(c) java.awt.A B
java.util.EventObje (d) java.awt.event.A WTEvent
WTEvent
ct
(d) It is
(c) There is no way to impossible to
(b) The last object determine which have more than
that was added as listener will be one listener for B
listener. invoked first. a
given event.
(c)
addTextListener(eh (b) eh.add'l'extListener(t);
(d) addTextListener(t,eh A
.t);
A component may
handle its own
events by
overriding
A component may not handle
Optionits(a)
ownandevents
(b) D
its event-
dispatching
method.
(b) False B
(b) False B
(d) Modifying
(b) Deleting and (c) Receiving and A
and Receving
Processing events Deleting events
events
1 A set of rules that governs data communication
Which of this class is used to create servers that listen for
2 either local or remote client programs?
Server, Client (c) Server, Server (b) Client, Server (d) Host, Client
An iterative (b) A concurrent (c) A concurrent or an iterative (d) None ofthese
(d) connection-
connectionless, iterative (b) connectionless, concurrent (c) connection-oriented, iterative oriented,
concurrent
(d) connection-
connectionless, iterative (b) connectionless, concurrent (c) connection-oriented, iterative oriented,
concurrent
(d) Proxy
TCIP/lP (c) Socket (b) DNS
Server
(d) Domain
) Data Network Service (b) Data Name Service (c) Domain Network Service
Name System
stream (b) message (c) block (d) segment
gethostO (b) GetHostO (c) GethostO (d) getHostO
(a) DatagramPacket ( b) URL (c) InetAddress (d) Socket
(a) • file in disk (b) directory path (c) file/directory on disk (d) file in folder
(d)
(a) java.security.Policy (b) java.policy.security (c) java.plicy
java.security
(d) Public
(a) public Create Policyt) (b) public PolicyO (c) protected policyi)
policyt)
(b) public static Policy
public Policy getPolicy() (c) public Policy getPolicy() (d) public static Policy getPolicy()
GetPolicyO
(b) security class (c) policy object (d) policy
(a) security object
method
ServerSockets D
A
None ofthese B
A
B
B
D
D
A
D
C
C
B
D
Universal Resource Latch A
C
toExternalFormO D
D
None ofthese A
C
B
C
D
GetLastModifiedO B
D
C
A
B
D
public static Policy getPolicy()
C
ava.security.Permission D
D
included in java
1 Import java.sql. *;
program to establish database connectivity using JDBC
22 What is backend ? a) DB
URL or machine name where User ID, Password, URL or Password, URL or machine name
server runs, User ID, machine name where where server runs,
Password. server runs User IDView.
(b) Connection statement (c) Callable statements (d) All ofthe mentioned
(c) Java interpreter (b) Java API (d) Both (a) and (b
(b) Stored procedure (c) date, time and timestamp only (d) CREATE and DROP VIEW only
(b) JDBC-ODBC Bridge Driver (c) JDBC-net pure java (d) N one of these
(b) JDBC-ODBC Bridge Driver (c) JDBC-net pure java (d) None of these
(b) Callable statement (c) Both (a) and (b) (d) None ofthese
11 Which is least visibility scope for Java bean in JSP? (a) Page
Which of the following is/are true for JSP technology ? 1. It is
persistent.
12 II. Platform independent. (a) Only (I) above .
III. Browser executes the code.
(b) Java code (c) Machine-independent code (d) None ofthe above is correct
(c) In the MySQL database
(b) In the MySQL database metasql (d) None ofthe mentioned
mysql
(b) Platform independent (c) High performance (d) It is multi threaded
(b) Only (1) and (2) (c) Only (1), (3) and (4) (d) Only (1) and (4)
(c) Only (3), (4) and (5) (b) Only (1), (2) and (3) (d) Only (1), (4) and (5)
(b) static content (c) hardware (d) both (a) and (b)
(e) <jsp:use:include>.
(e) Global.
(e) getParameters.
(e) Page