Consider the following paint method to answer the questions below:
public void paint(Graphics page)
{
int x, y = 200;
page.setColor(Color.blue) ;
for (x = 100; x < 200; x += 20)
page.fillRect(x, y, 10, y-x) ;
}
-This paint method will draw several bars (sort of like a bar graph) . How many bars will be displayed?
A) 4
B) 5
C) 6
D) 10
E) 20
Correct Answer:
Verified
Q4: Given the following switch statement where x
Q6: The do loop differs from the while
Q7: If a switch statement is written that
Q7: A switch statement must have a default
Q8: The following nested loop structure will execute
Q10: Consider the following paint method to answer
Q11: Each case in a switch statement must
Q12: Consider the following paint method to answer
Q13: How many times will the following loop
Q14: Given that s is a String, what
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents