Solved

When Added to the Code Below, Which Statement Will Set

Question 13

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents