Java Graphics  «Prev  Next»

AWT and Java graphics - Quiz

1. What AWT class forms the basis of Java graphics?
Please select the best answer.
  A. Color
  B. Graphics
  C. Paint

2. Which method from the Graphics class could you use to draw a square?
Please select the best answer.
  A. Use the drawRect() method.
  B. Use the drawSquare() method.
  C. Create a Square object.

3. In JavaFX, which class represents the primary window (top-level container) of an application?
Please select the best answer.
  A. Stage
  B. Scene
  C. Application

4. Which method must be overridden in a JavaFX Application subclass to build the UI?
Please select the best answer.
  A. init()
  B. start(Stage)
  C. main(String[] args)