Multiple choice

Which of the following objects are input to the paint() method?

  1. Canvas

  2. Graphics

  3. Paint

  4. Image

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The paint() method signature is paint(Graphics g). It receives a Graphics object as input, which provides the drawing context for rendering on the component surface.