Multiple choice

Which of the following methods set the frame surface color to pink?

  1. setBackground(Color.pink);

  2. setColor(PINK);

  3. Background(pink);

  4. None of the above

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

The setBackground(Color) method, inherited from Component, sets the background color of any component including Frame. Color.pink is the correct way to specify pink color in Java AWT.