Deck 5: Java Inputoutput and Event Handling

ملء الشاشة (f)
exit full mode
سؤال
The ________ method help in clearing the contents of the buffer:

A)flush()
B)clear()
C)rub()
D)vanish()
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The _______ class is used to write bytes to a file:

A)FileInputStream
B)FileOutputStream
C)FileBufferStream
D)FileStringStream
سؤال
The _______ class is used to read characters from the file:

A)StreamReader
B)CharacterReader
C)InputReader
D)FileReader
سؤال
DataInputStream class contains methods to read________

A)Non primitive data type
B)Primitive data type
C)Formatted data
D)all of the above
سؤال
Whenever the applet requires to redraw its output, it is done by using method

A)display()
B)paint()
C)displayApplet()
D)PrintApplet()
سؤال
Which of these methods can be used to output a string in an applet?

A)display()
B)print()
C)drawString()
D)transient()
سؤال
What does AWT stands for?

A)All Window Tools
B)All Writing Tools
C)Abstract Window Toolkit
D)Abstract Writing Toolkit
سؤال
Which of these packages contains all the classes and methods required for event handling in Java? a) jav

A)applet
B)java.awt
C)java.event
D)java.awt.event
سؤال
What is an event in delegation event model used by Java programming language?

A)An event is an object that describes a state change in a source.
B)An event is an object that describes a state change in processing.
C)An event is an object that describes any change by the user and system.
D)An event is a class used for defining object, to create events.
سؤال
Which of these methods are used to register a keyboard event listener?

A)KeyListener()
B)addKistener()
C)addKeyListener()
D)eventKeyboardListener()
سؤال
Which of these methods are used to register a MouseMotionListener?

A)addMouse()
B)addMouseListener()
C)addMouseMotionListner()
D)eventMouseMotionListener()
سؤال
What is a listener in context to event handling?

A)A listener is a variable that is notified when an event occurs.
B)A listener is an interface that is notified when an event occurs.
C)A listener is a method that is notified when an event occurs.
D)None of the mentioned
سؤال
Which of these class is super class of all AWT events?

A)AWTEvent
B)EventClass
C)ActionEvent
D)ItemEvent
سؤال
Which of these events will be generated if scroll bar is manipulated?

A)ActionEvent
B)ComponentEvent
C)AdjustmentEvent
D)WindowEvent
سؤال
Which of these events will be generated if we close a Frame window?

A)ActionEvent
B)ComponentEvent
C)AdjustmentEvent
D)WindowEvent
سؤال
Which of these events is generated when a button is pressed?

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

A)getCommand()
B)getActionCommand()
C)getActionEvent()
D)getActionEventCommand()
سؤال
Which of these methods in KeyEvent class can be used to know which key is pressed?

A)getKeyCode()
B)getModifier()
C)getActionKey()
D)getActionEvent()
سؤال
Which of these interfaces define a method actionPerformed()?

A)ComponentListener
B)ContainerListener
C)ActionListener
D)InputListener
سؤال
Which of these interfaces define a method itemStateChanged()?

A)ComponentListener
B)ContainerListener
C)ActionListener
D)ItemListener
سؤال
What are the sequences of method executed when an Applet starts execution?

A)init(),start(),stop(),destroy()
B)load(),start(),stop(),unload()
C)init(),activate(),deactivate(),destroy()
D)start(),init(),destroy(),stop()
سؤال
The default layout manager of an Applet is

A)Flowlayout
B)Gridlayout
C)BorderLayout
D)BoxLayout
سؤال
The default layout manager of a Frame is

A)Flowlayout
B)Gridlayout
C)BorderLayout
D)BoxLayout
سؤال
Which package consist an applet class?

A) java.applet
B)java.awt
C)java.awt.applet
D)java.event
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/24
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Java Inputoutput and Event Handling
1
The ________ method help in clearing the contents of the buffer:

A)flush()
B)clear()
C)rub()
D)vanish()
flush()
2
The _______ class is used to write bytes to a file:

A)FileInputStream
B)FileOutputStream
C)FileBufferStream
D)FileStringStream
FileOutputStream
3
The _______ class is used to read characters from the file:

A)StreamReader
B)CharacterReader
C)InputReader
D)FileReader
FileReader
4
DataInputStream class contains methods to read________

A)Non primitive data type
B)Primitive data type
C)Formatted data
D)all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
5
Whenever the applet requires to redraw its output, it is done by using method

A)display()
B)paint()
C)displayApplet()
D)PrintApplet()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
6
Which of these methods can be used to output a string in an applet?

A)display()
B)print()
C)drawString()
D)transient()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
7
What does AWT stands for?

A)All Window Tools
B)All Writing Tools
C)Abstract Window Toolkit
D)Abstract Writing Toolkit
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
8
Which of these packages contains all the classes and methods required for event handling in Java? a) jav

A)applet
B)java.awt
C)java.event
D)java.awt.event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
9
What is an event in delegation event model used by Java programming language?

A)An event is an object that describes a state change in a source.
B)An event is an object that describes a state change in processing.
C)An event is an object that describes any change by the user and system.
D)An event is a class used for defining object, to create events.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
10
Which of these methods are used to register a keyboard event listener?

A)KeyListener()
B)addKistener()
C)addKeyListener()
D)eventKeyboardListener()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
11
Which of these methods are used to register a MouseMotionListener?

A)addMouse()
B)addMouseListener()
C)addMouseMotionListner()
D)eventMouseMotionListener()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
12
What is a listener in context to event handling?

A)A listener is a variable that is notified when an event occurs.
B)A listener is an interface that is notified when an event occurs.
C)A listener is a method that is notified when an event occurs.
D)None of the mentioned
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
13
Which of these class is super class of all AWT events?

A)AWTEvent
B)EventClass
C)ActionEvent
D)ItemEvent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which of these events will be generated if scroll bar is manipulated?

A)ActionEvent
B)ComponentEvent
C)AdjustmentEvent
D)WindowEvent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which of these events will be generated if we close a Frame window?

A)ActionEvent
B)ComponentEvent
C)AdjustmentEvent
D)WindowEvent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
16
Which of these events is generated when a button is pressed?

A)ActionEvent
B)KeyEvent
C)WindowEvent
D)AdjustmentEvent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
17
Which of these methods can be used to obtain the command name for ActionEvent object?

A)getCommand()
B)getActionCommand()
C)getActionEvent()
D)getActionEventCommand()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
18
Which of these methods in KeyEvent class can be used to know which key is pressed?

A)getKeyCode()
B)getModifier()
C)getActionKey()
D)getActionEvent()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which of these interfaces define a method actionPerformed()?

A)ComponentListener
B)ContainerListener
C)ActionListener
D)InputListener
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
20
Which of these interfaces define a method itemStateChanged()?

A)ComponentListener
B)ContainerListener
C)ActionListener
D)ItemListener
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
21
What are the sequences of method executed when an Applet starts execution?

A)init(),start(),stop(),destroy()
B)load(),start(),stop(),unload()
C)init(),activate(),deactivate(),destroy()
D)start(),init(),destroy(),stop()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
22
The default layout manager of an Applet is

A)Flowlayout
B)Gridlayout
C)BorderLayout
D)BoxLayout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
23
The default layout manager of a Frame is

A)Flowlayout
B)Gridlayout
C)BorderLayout
D)BoxLayout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
24
Which package consist an applet class?

A) java.applet
B)java.awt
C)java.awt.applet
D)java.event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 24 في هذه المجموعة.