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.
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 );
Step by Step Solution
3.33 Rating (150 Votes )
There are 3 Steps involved in it
d gdra... View full answer
Get step-by-step solutions from verified subject matter experts
