Multiple Choice
In the code below, write a statement that sets the graphic to green. public class ItalianFlagComponent extends JComponent
{
Public void paintComponent(GraphicsG) {
Graphics2D g2 = (Graphics2D) g;
Rectangle.Double leftRectangle = new Rectangle.Double(100, 100, 30, 60) ;
) . .
____
) . .
}
}
A) g2.setColor(GREEN) ;
B) g2.SetColor(0, 255, 0) ;
C) g2.setColor(Color.GREEN) ;
D) g2.setColor("GREEN") ;
Correct Answer:

Verified
Correct Answer:
Verified
Q17: Which of the following statements about methods
Q18: What terminology describes a method that returns
Q19: Which statement stores an integer value in
Q20: What terminology describes a method that modifies
Q24: What is the output of the following
Q25: The object on which the method call
Q26: By convention, classes begin with a(n) _.<br>A)
Q27: Which of the following represents a method
Q44: Which of the following statements about test
Q46: Which of the following terms denotes the