Object Oriented Programming through Java Mid - II, November - 2014

1.Which method will wait for a thread to terminate.
  • Sleep()
  • run()
  • Join()
  • start()
Answer: C
2.__is the process by which a primitive type automatically encapsulated into its equivalent type.
  • Auto boxing
  • Annotation
  • Convert
  • Generic
Answer: A
3.__interface defines the action performed method that is invoked when an action event occurs
  • Action Listener
  • Item Listener
  • Adjustment Listener
  • key Listener
Answer: C
4.____class provides an empty implementation of all methods in an event Listener Interface.
  • Anonymous
  • Listener
  • Adapter
  • none
Answer: C
5.A____manager automatically position components with in a container.
  • Container
  • Component
  • Layout
  • None
Answer: B
6.Applets based on Swing class are ___.
  • AWT
  • JApplets
  • cookies
  • Applets
Answer: B
7.AWT based applets override the __________method.
  • Graphics
  • draw string
  • Paint
  • Swing
Answer: C
8.____ are used to select continuous values between a specified minimum and maximum.
  • Scroll bar
  • check box
  • Dialog
  • Menu bar
Answer: A
9.Applets need a ________ to execute it.
  • Component
  • Container
  • Console
  • none
Answer: B
10._____is the top level container that is commonly used for swing applets.
  • JLabel
  • JButton
  • JFrame
  • JList
Answer: C
11.In java, an enumeration defines a ___________type.
Answer: Class
12.To set a thread priority _________________method is used.
Answer: setPriority()
13.Window object cannot be created directly, instead we use a sub class of window called ________.
Answer: frame
14.The _____________________class defines a number of drawing functions.
Answer: graphics
15.The ____________interface provides the means by which an applet and the browser communicate.
Answer: applet stub
16._____________method is called only once during the run time of your applet.
Answer: init()
17.A swing applet extends _________________.
Answer: JApplet
18.Trees are implemented in Swing by the ________________class.
Answer: JFrame
19.Frame inherits all capabilities defined by a____________________.
Answer: Component
20.The JButton class provides the functionality of a __________button.
Answer: Push