Section 9 Quiz
1. The JavaFX API contains descriptions of Java FX features.
benar (*)
Palsu
Correct
(1/1) Point
2. How would you create a custom color that is pure cyan (equal parts green and blue)?
Color customColor = Color.rgb(0, 255, 0);
Color customColor = Color.rgb(0, 0, 255);
Color customColor = Color.rgb(255, 255, 0);
Color customColor = Color.rgb(0, 255, 255); (*)
Correct
(1/1) Point
3. Which method helps to set the width of a rectangle’s outline?
setStroke(Paint paint)
setLayoutX(double d)
setStrokeWidth(double d) (*)
setX(double d)
Correct
(1/1) Point
4. Which color is not directly used when creating custom Color.rgb()?
Yellow (*)
Blue
Red
Green
Correct
(1/1) Point
5. Which is the correct syntax to instantiate a JavaFX Rectangle?
Rectangle rect = new Rectangle(20, 20);
Rectangle rect = Rectangle(20, 20, 100, 200, 200);
Rectangle rect = new Rectangle(20, 20, 100, 200); (*)
Rectangle rect = new Rectangle(20, 20, 100);
Correct
6. JavaFX is used to create GUI applications.
benar (*)
Palsu
Correct
(1/1) Point
7. The start() method is the entry point for all JavaFX applications.
benar (*)
Palsu
Correct
(1/1) Point
8. Which type of Root Node allows Nodes to be placed anywhere?
StackPane
Group (*)
HBox
TilePane
Correct
(1/1) Point
9. Which is not a JavaFX Node?
Button
Object (*)
ScrollBar
ImageView
Correct
(1/1) Point
10. How would you set the title of the Stage primaryStage?
primaryStage("New Title!");
primaryStage.title = "New Title!";
primaryStage.setTitle("New Title!"); (*)
primaryStage = "New Title!;
Correct
11. JavaFX doesn’t provide you with UI elements, shapes and text. So you must always create your own graphics.
benar
Palsu (*)
Correct
(1/1) Point
12. When you write code for MouseEvents, you are telling a Node to listen for a particular event.
benar (*)
Palsu
Correct
(1/1) Point
13. An Image is an object that describes the location of a graphics file.
benar (*)
Palsu
Correct
(1/1) Point
14. Lambda Expressions provide much more effective and cleaner syntax for working with GUI applications and sorting lists.
benar (*)
Palsu
Correct
(1/1) Point
15. Which method is used to for mouse click events?
setOnMouseDragged()
setOnMouseReleased()
setOnMouseMoved()
setOnMouseClicked() (*)
Correct
Posting Komentar untuk "Section 9 Quiz"