4.7 Exercises, Problems, and Projects
4.7.1 Multiple Choice Exercises
-
1. What package does the GraphicsContext class belong to?
❑ javafx.scene.paint
❑ javafx.scene.canvas
❑ javafx.stage
❑ javafx.application
-
2. If a window is 400 by 800 pixels, how many pixels does the window contain?
❑ 1,200 pixels
❑ 32,000 pixels
❑ 320,000 pixels
-
3. A JavaFX graphical application opens a window.
❑ true
❑ false
-
4. In JavaFX graphical applications, the start method is called automatically; the programmer does not code the method call.
❑ true
❑ false
-
5. Look at the following code:
Color c = Color.BLUE;
What is BLUE?
❑ a static constant of the class Color
❑ an instance variable of the class Color
❑ a static method of the class ...
Get Java Illuminated, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.