Given a Graphics object g, to draw an outline of a rectangle of width 20 and height 50 with the upper-left corner at (20, 20), you use ___.

Given a Graphics object g, to draw an outline of a rectangle of width 20 and height 50 with the upper-left corner at (20, 20), you use __________.


A. g.drawRect(20, 50, 20, 20)
B. g.drawRectFill(20, 20, 20, 50)
C. g.drawRect(20, 20, 20, 50)
D. g.drawRectFill(20, 50, 20, 20)

The correct answer is C


Java

Learn More Multiple Choice Question :