I have some questions on Java Programming that need to be answered. ............
ID: 643953 • Letter: I
Question
I have some questions on Java Programming that need to be answered.
..........................................................................................................
1). An event handler needs to be registered with a node to react to events. True or False?
_____________
2). ActionEvent is fired when a mouse click occurs. True or False?
_____________
3). You would like to find out what key from the keyboard a user presses in a textbox. Which of the following method needs to be registerd?
a). setOnKeyPressed(EventHandler)
b). setOnAction(EventHandler)
c). setOnKeyTyped(EventHandler)
d). setOnKeyReleased(EventHandler)
_____________
4). Assume you are given a piece of Javafx code where you found that setOnAction() method is registered to process events.
Which of the following interaction is not application for the setOnAction () method?
a). User clicked on a button
b). User checked a box
c). User press enter in a textbox
d). User clicked on mouse
_____________
5). An inner class can access to a private instance variable of an outer class. True or False?
_____________
6). The following code has an outer class and an inner class. What will be the output displayed for the following code?
a). syntax error
b). runtime error
c). 35
d). none of the above
Explanation / Answer
1)true
2)false mouse event
3)a
4)b
5)true
6)35