SHRI VISHNU ENGINEERING COLLEGE FOR WOMEN:: BHIMAVARAM
(AUTONOMOUS)
IV B TECH I SEMESTER OBJECTIVE EXAMINATION - II
Subject Name: JAVA PROGRAMMING
Registered Number: Time : 20 Mins
Name of the Student: Max. Marks: 20*1/2 = 10 M
Branch Signature of the Invigilator
CO 4: Able to understand mulltithreading concept and develop multithreading programs
1 In JAVA multi threading, a thread can be created by_______ [ ]01
a) Extending class b) Implementing Runnable Interface
c) both d) none
2 Which method is used to make main thread to wait for all child threads [ ]02
a) Wait() b) Sleep() c) Join() d) Stop()
3 Which method is used to check if the thread is running [ ]03
a) isAlive() b) run() c) alive() d) keepAlive()
4 The life cycle of thread in JAVA is controlled by [ ]04
a) JDK b) JVM c) JRE d) None
5 Which method is used to get current running thread object? [ ]05
a) RunningThread() b) currentThread() c) runnableThread() d) None
6 Which of these method is used to explicitly set the priority of a thread? [ ]06
a) set() b) make() c) setPriority() d) makePriority()
7 Thread priority in Java is? [ ]07
a) Integer b) Float c) Double d) Long
CO 5: Able to practice and design applets for Web Applications
8 Which of these methods will respond when you click any button by mouse? [ ]08
a) mouseClicked() b) mouseEntered() c) mousePressed() d) all of the mentioned
9 Which of these events will be notified if scroll bar is manipulated? [ ]09
a) ActionEvent b) ComponentEvent c) AdjustmentEvent d) WindowEvent
10 Which applet java.awt.component class provides the life cycle method [ ]10
a) Public void paint(Graphics ) b) public void destroy()
c) public void stop() d) public void init()
11 Which of these methods can be used to change location of an event? [ ]11
a) ChangePoint() b) TranslatePoint() c) ChangeCordinates() d) TranslateCordinates()
12 Which of these are constants defined in WindowEvent class? [ ]12
a) WINDOW_ACTIVATED b) WINDOW_CLOSED
c) WINDOW_DEICONIFIED d) All of the mentioned
13 What is the default layout for Dialogs [ ]13
a)FlowLayout b) BorderLayout c) CardLayout d)GridLayout
14 Which alignment directions may be used with BoxLayout? [ ]14
a) Horizontal only b) Horizontal & Vertical
c) Left and Right aligned d) Centered and Justified
CO 6: Able to explain and design AWT for GUI Applications
15 Which one method is used to set the visibility of the frame? [ ]15
a) setVisible(true) b) setVisible(false) c) setVisible() d) None
16 Which method can set or change the text in a Label? [ ]16
a) setText() b) getText() c) All of the above d) None
17 Which package provides many event classes and Listener interfaces for event handling? [ ]17
a) java.awt b) java.awt.Graphics c) java.awt.event d) None of the above
18 Which class is used to create a pop-up list of items from which the user may choose? [ ]18
a) List b) Choice c) Labels d) Checkbox
19 The following way is used to create a frame is by creating the object of Frame class? [ ]19
a) inheritance b) association c) Both A & B d) None of the above
20 Positions the components into five regions: east, west, north, south, center [ ]20
a) BorderLayout b) CardLayout c) GridLayout d) Flowlayout
SHRI VISHNU ENGINEERING COLLEGE FOR WOMEN:: BHIMAVARAM
(AUTONOMOUS)
IV B TECH I SEMESTER OBJECTIVE EXAMINATION - II
Subject Name: JAVA PROGRAMMING
Registered Number: Time : 20 Mins
Name of the Student: Max. Marks: 20*1/2 = 10 M
Branch Signature of the Invigilator
CO 4: Able to understand mulltithreading concept and develop multithreading programs
1 Which method is called internally by Thread start( ) method [ ]01
a) Execute( ) b) run( ) c) launch( ) d) start()
2 Which statements is/are correct [ ]02
a) On calling Thread start ( ) method a new thread is created
b)Thread start( ) method call run( ) method internally
c) Thread run( ) method can also be called directly to create thread d) both a & b
3 Which method we implement from runnable interface [ ]03
a) Run() b) Start() c) Execute() d) call()
4 What is maximum thread priority in Java [ ]04
a) 10 b) 12 c) 5 d) 8
5 If a priority of a JAVA thread is 3 then the default priority of its child thread will be [ ]05
a) 0 b) 1 c) 3 d) 5
6 Thread Synchronization in a process will be required when [ ]06
a) All thread share the same address space b) all threads share the same global variables
c) All threads sharing the same files d) all of these
7 Which of these are types of multitasking? [ ]07
a) Process based b) Thread Based c) Both A & B d) None
CO 5: Able to practice and design applets for Web Applications
8 Default Layout manager for subclass of "Window" is [ ]08
a) CardLayout b) GridBagLayout c) Frame d)BorderLayout
9 Which of these methods can be used to obtain the coordinates of a mouse? [ ]09
a) getPoint() b) getCoordinates() c) getMouseXY() d) getMouseCordinates()
10 The _______ interface is used to handle the menu events [ ]10
a) ContainerListener b) FocusListener c) ActionListener d) WindowListener
11 Which of these methods are used to register a keyboard event listener? [ ]11
a) KeyListener() b) addKistener() c) addKeyListener() d) eventKeyboardListener()
12 Event class is defined in which of these libraries? [ ]12
a) java.io b) java.lang c) java.net d) java.util
13 Which of these interfaces define a method actionPerformed()? [ ]13
a) ComponentListener b) ContainerListener c) ActionListener d) InputListener
14 The constructor for Font class is [ ]14
a) Font(String name) b) Font(String name, int style, int size)
c) Font(String name, int size) d) Font(String name, int style)
CO 6: Able to explain and design AWT for GUI Applications
14 The Swing Component classes that are used in Encapsulates a mutually exclusive set of buttons? [ ]14
a) AbstractButton b) ButtonGroup c) Jbutton d) ImageIcon
15 Which are passive controls that do not support any interaction with the user? [ ]15
a) Choice b) List c) Labels d) Checkbox
16 Where can the event handling code be written? [ ]16
a) Same class b) Other class c) Anonymous Class d) All of the above
17 Which class is used to create a pop-up list of items from which the user may choose? [ ]17
a) List b) Choice c) Labels d) Checkbox
18 Positions the components into five regions: east, west, north, south, center [ ]18
a) BorderLayout b) CardLayout c) GridLayout d) Flowlayout
_________ generates action events when an item is double-clicked, generate action events when an
19 item is selected or deselected [ ]19
a) List b) Check box c) Menu item d) Text box
20 A label is a simple control which is used to display_____________ on the window [ ]20
a) Text(Non-editable) b) Text(editable) c) Both a & b d) none of these