Deck 15: Java Programming : Event Handling, Exception Handling
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/15
Play
Full screen (f)
Deck 15: Java Programming : Event Handling, Exception Handling
1
Standard output variable 'out' is defined in which class?
A)Void
B)Process
C)Runtime
D)System
A)Void
B)Process
C)Runtime
D)System
System
2
Which of these packages contains all the event handling interfaces?
A)java.lang
B)java.awt
C)java.awt.event
D)java.event
A)java.lang
B)java.awt
C)java.awt.event
D)java.event
java.awt.event
3
Which of these keywords is not a part of exception handling?
A)try
B)finally
C)thrown
D)catch
A)try
B)finally
C)thrown
D)catch
thrown
4
Which of these exceptions handles the divide by zero error?
A)ArithmeticException
B)MathException
C)IllegalAccessException
D)IllegarException
A)ArithmeticException
B)MathException
C)IllegalAccessException
D)IllegarException
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
5
Which of these exceptions will occur if we try to access the index of an array beyond its length?
A)ArithmeticException
B)ArrayException
C)ArrayIndexException
D)ArrayIndexOutOfBoundsException
A)ArithmeticException
B)ArrayException
C)ArrayIndexException
D)ArrayIndexOutOfBoundsException
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
6
What decides thread priority?
A)Process
B)Process scheduler
C)Thread
D)Thread scheduler
A)Process
B)Process scheduler
C)Thread
D)Thread scheduler
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
7
Which of the following will ensure the thread will be in running state?
A)yield()
B)notify()
C)wait()
D)Thread.killThread()
A)yield()
B)notify()
C)wait()
D)Thread.killThread()
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
8
Which of these is used to read a string from the input stream?
A)get()
B)getLine()
C)read()
D)readLine()
A)get()
B)getLine()
C)read()
D)readLine()
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
9
Which of these methods can be used to output a string in an applet?
A)display()
B)print()
C)drawString()
D)tr
A)display()
B)print()
C)drawString()
D)tr
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
10
Which of these methods is a part of Abstract Window Toolkit (AWT) ?
A)display()
B)paint()
C)drawString()
D)tr
A)display()
B)paint()
C)drawString()
D)tr
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
11
Which of these operators can be used to get run time information about an object?
A)getInfo
B)Info
C)instanceof
D)getinfoof
A)getInfo
B)Info
C)instanceof
D)getinfoof
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
12
Which of these methods can be used to writing console output?
A)print()
B)println()
C)write()
D)all of the mentioned
A)print()
B)println()
C)write()
D)all of the mentioned
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
13
Which of these class is used to read from a file?
A)InputStream
B)BufferedInputStream
C)FileInputStream
D)BufferedFileInputStream
A)InputStream
B)BufferedInputStream
C)FileInputStream
D)BufferedFileInputStream
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
14
Which of these events is generated by scroll bar?
A)ActionEvent
B)KeyEvent
C)WindowEvent
D)AdjustmentEvent
A)ActionEvent
B)KeyEvent
C)WindowEvent
D)AdjustmentEvent
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
15
Which of these methods can be used to obtain the command name for invoking ActionEvent object?
A)getCommand()
B)getActionCommand()
C)getActionEvent()
D)getActionEventCommand()
A)getCommand()
B)getActionCommand()
C)getActionEvent()
D)getActionEventCommand()
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck