Multiple Choice
If you want to draw a red circle inside of a green square in an applet where the paint method is passed a Graphics object called page, which of the following sets of commands might you use?
A) page.setColor(Color.green) ; page.fillRect(50, 50, 100, 100) ;
Page.setColor(Color.red) ;
Page.fillOval(60, 60, 80, 80) ;
B) page.setColor(Color.red) ; page.fillOval(60, 60, 80, 80) ;
Page.setColor(Color.green) ;
Page.fillRect(50, 50, 100, 100) ;
C) page.setColor(Color.green) ; page.fillRect(60, 60, 80, 80) ;
Page.setColor(Color.red) ;
Page.fillOval(50, 50, 100, 100) ;
D) page.setColor(Color.red) ; page.fillOval(50, 50, 100, 100) ;
Page.setColor(Color.green) ;
Page.fillRect(60, 60, 80, 80) ;
E) any of the above would accomplish this
Correct Answer:

Verified
Correct Answer:
Verified
Q1: Consider the double value likelihood = 0.013885.
Q2: Which of the following would return the
Q5: There are three ways that data conversion
Q6: A cast is required in which of
Q7: Explain, in words, what the following statement
Q9: Using the various String methods, manipulate a
Q10: You specify the shape of an oval
Q30: In Java, 'a' and 'A' are considered
Q39: Write a program that will input some
Q66: What is wrong with the following assignment