Which of the following codes is used to display the string Hello World! at X=20 Y=50 location?

Question:

Which of the following codes is used to display the string “Hello World!” at X=20 Y=50 location? Assume that g holds a Graphics object reference.

(a) g.println( “Hello World!” );

(b) drawString( “Hello World!”, 20, 50 );

(c) g.drawString( 20, 50, “Hello World!” );

(d) g.drawString( “Hello World!”, 20, 50 );

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: