Solved

When Added to the Code Below, Which Statement Will Set

Question 36

Multiple Choice

When added to the code below, which statement will set the color of the next item drawn to green?
Public class ItalianFlagComponent extends JComponent
{
Public void paintComponent(Graphics g) {
g.drawRect(100, 100, 30, 60) ;
) . .
____________________________
) . .
}
}


A) g.setColor(GREEN) ;
B) g.setColor(0, 255, 0) ;
C) g.setColor(Color.GREEN) ;
D) g.setColor("GREEN") ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions