Self-Review Exercises

21.1Fill in the blanks in each of the following statements:
  1. Applet method _______ loads an image into an applet.

  2. Graphics method _______ displays an image on an applet.

  3. Java provides two mechanisms for playing sounds in an applet—the Applet’s play method and the play method of the _______ interface.

  4. A(n) _______ is an image that has hot areas that the user can click to accomplish a task such as loading a web page.

  5. Method _______ of class ImageIcon displays the ImageIcon’s image.

  6. Java supports several image formats, including _______, _______ and _______.

21.2Determine whether each of the following statements is true or false. If false, explain why.
  1. A sound is marked for garbage collection after it plays.

  2. Class ImageIcon provides ...

Get Java™ How to Program, Seventh 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.