Multiple Choice
Consider the following paint method and answer the questions below:
public void paint(Graphics page)
{
page.setColor(Color.blue) ;
page.fillRect(50, 50, 100, 100) ;
page.setColor(Color.white) ;
page.drawLine(50, 50, 150, 150) ;
page.drawLine(50, 150, 150, 50) ;
page.setColor(Color.black) ;
page.drawString("A nice box", 50, 170) ;
}
-The String "A nice box" is drawn
A) above the box
B) to the left of the box
C) to the right of the box
D) below the box
E) inside the box
Correct Answer:

Verified
Correct Answer:
Verified
Q34: Assume that a = "1", b =
Q49: Which library package would you import to
Q50: Write an output statement which will output
Q62: As explained in the Software Failure, the
Q65: An applet is 200x200. Write the Strings
Q66: Of the following types, which one cannot
Q69: Which of the following is True regarding
Q70: Assume that x is a double that
Q72: If you want to store into the
Q77: What is output with the statement System.out.println(x+y);