Java Programming Mid - II, November - 2014
1.following method in the thread class is not deprecated
-
yield
-
stop
-
resume
-
suspend
-
Answer: A
2..__________method to force one thread to wait for another thread to finish
-
slep
-
stop
-
join
-
sleep
-
Answer: C
3.An instance of ______ describes the errors caused by your program and external circumstances can be caught and handled by the program.
-
Runtime exception
-
Exception
-
Error
-
throw able
-
Answer: B
4.A java exception is an instance_________.
-
Runtime exception
-
Exception
-
Error
-
throw able
-
Answer: D
5.The Interface __________ should be implemented to listen for a button.
-
MouseListener
-
ActionListener
-
FocusListener
-
WindowListener
-
Answer: A
6.Every object has the ____________ method.
-
get Source
-
get Action Command
-
get Time Stamp
-
get When
-
Answer: A
7.To use no layout manager in a container c, use_____________.
-
c.setLayout
-
c.setLayout (new NullLayout )
-
c.setLayout (null)
-
c.setLayout (Null Layout)
-
Answer: C
8.The preferred Size property is ignored in ______________Layout.
-
Grid
-
Border
-
Flow
-
Any
-
Answer: A
9._________ Layout put a flexible spring around a component.
-
Grid
-
Border
-
Flow
-
Spring
-
Answer: D
10.A Java program cannot directly communicate with an ODBC driver because ODBC written in which language _______.
-
C
-
Basic
-
c#
-
c++
-
Answer: B
11.A JMenuItem is a subclass of ______________
Answer: AbstractButton
12._________are referred to as heavy weight components.
Answer: AWT components
13.__________ component cannot be added to a container.
Answer: JFrame
14.The data in DefaultListModel are stored in________.
Answer: vector
15.The _________method executes a simple query and returns a single Result Set Object.
Answer: ExecuteQuery
16.____________ method can be used to temporarily to release time for other threads.
Answer: Yield
17.The keyword to synchronize methods in java is_________________.
Answer: synchronized
18.___________ method is not defined in object class
Answer: sleep
19.To be a listener for ActionEvent, an object must be an instance of__________.
Answer: ActionListener
20.__________is a property of JApplet.
Answer: contentPane