Multiple choice

The first argument of the method 'drawstring ()' is of _____ type.

  1. character

  2. Boolean

  3. Integer

  4. String

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The drawString() method in Java Graphics class requires a String as its first argument, which specifies the text to be rendered. The subsequent arguments specify the x and y coordinates where the string should be drawn on the graphical context.