Deck 15: Java Programming : Event Handling, Exception Handling

Full screen (f)
exit full mode
Question
Standard output variable 'out' is defined in which class?

A)Void
B)Process
C)Runtime
D)System
Use Space or
up arrow
down arrow
to flip the card.
Question
Which of these packages contains all the event handling interfaces?

A)java.lang
B)java.awt
C)java.awt.event
D)java.event
Question
Which of these keywords is not a part of exception handling?

A)try
B)finally
C)thrown
D)catch
Question
Which of these exceptions handles the divide by zero error?

A)ArithmeticException
B)MathException
C)IllegalAccessException
D)IllegarException
Question
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
Question
What decides thread priority?

A)Process
B)Process scheduler
C)Thread
D)Thread scheduler
Question
Which of the following will ensure the thread will be in running state?

A)yield()
B)notify()
C)wait()
D)Thread.killThread()
Question
Which of these is used to read a string from the input stream?

A)get()
B)getLine()
C)read()
D)readLine()
Question
Which of these methods can be used to output a string in an applet?

A)display()
B)print()
C)drawString()
D)tr
Question
Which of these methods is a part of Abstract Window Toolkit (AWT) ?

A)display()
B)paint()
C)drawString()
D)tr
Question
Which of these operators can be used to get run time information about an object?

A)getInfo
B)Info
C)instanceof
D)getinfoof
Question
Which of these methods can be used to writing console output?

A)print()
B)println()
C)write()
D)all of the mentioned
Question
Which of these class is used to read from a file?

A)InputStream
B)BufferedInputStream
C)FileInputStream
D)BufferedFileInputStream
Question
Which of these events is generated by scroll bar?

A)ActionEvent
B)KeyEvent
C)WindowEvent
D)AdjustmentEvent
Question
Which of these methods can be used to obtain the command name for invoking ActionEvent object?

A)getCommand()
B)getActionCommand()
C)getActionEvent()
D)getActionEventCommand()
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/15
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
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
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
java.awt.event
3
Which of these keywords is not a part of exception handling?

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
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
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
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()
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()
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
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
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
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
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
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
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()
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 15 flashcards in this deck.