Method to set graphics current color to specified color in the graphics class - AWT and Swing

Q.  Which method is used to set the graphics current color to the specified color in the graphics class?
- Published on 22 Jul 15

a. public abstract void setFont(Font font)
b. public abstract void setColor(Color c)
c. public abstract void drawString(String str, int x, int y)
d. None of the above

ANSWER: public abstract void setColor(Color c)

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)