Solved

Assume Page Is a Graphics Object

Question 66

Essay

Assume page is a Graphics object. If the following method is called with drawIt(50, page), show what is displayed on the Graphics object page.
public void drawIt(int x, Graphics page)
{
if (x > 10)
{
page.setColor(Color.black);
page.drawRect(0, 0, x, x);
drawIt(x - 10, page);
}
}

Correct Answer:

verifed

Verified

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

Related Questions