Which of the following methods from the java.awt.Graphics class would be used to draw the outline of a rectangle with a single method call? a) fillRect() b) drawRect() c) fillPolygon() d) drawPolygon() e) drawLine()
The answer is b) and d) drawPoligon will also draw rectangle if you'll give an array of ccordanates of rectangle as an argument. I answered this question I got right. Jamal
Does drawPolygon() still count as a single call though? You have to do a lot of prep-work first, by creating an array, and populating with data, THEN calling drawPolygon() and passing the data. With drawRect() you don't need any other prepatory work, you can make a single call with the data you need in that call. Or am I splitting hairs here? (being too picky??)
Rob
SCJP 1.4
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.