Moderate

Package of drawstring() method is _________________?

Correct answer: A. java.awt

  • A. java.awt
  • B. javax.swing
  • C. java.applet
  • D. java.io

Explanation

drawString() is a method of Java's Graphics class, which belongs to the java.awt package. Swing and applet packages may use graphics, but they do not define this method's package.

Last updated

Practise Web and Mobile Development

268 free Web and Mobile Development MCQs from Software Engineering, each with the correct answer and an explanation. Unlimited attempts, no account needed.

Exams that ask Software Engineering questions like this

Software Engineering is on this paper prepared for on TestUstad, and all of them draw the same bank, so this question is worth knowing for it.

Related questions