Exercises

  1. 27.4 Fill in the blanks in each of the following statements:

    1. Class                  of the Java 2D API is used to draw ovals.

    2. Methods draw and fill of class Graphics2D require an object of type                  as their argument.

    3. The three constants that specify font style are                 ,                  and                 .

    4. Graphics2D method sets                  the painting color for Java 2D shapes.

  2. 27.5 State whether each of the following is true or false. If false, explain why.

    1. Graphics method drawPolygon automatically connects the endpoints of the polygon.

    2. Graphics method drawLine draws a line between two points.

    3. Graphics method fillArc uses degrees to specify the angle.

    4. In the Java coordinate system, values on ...

Get Java How to Program, Early Objects, 11th 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.