Which of the following codes is used to display the string Hello World! at X=20 Y=50 location?…
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 ); Which of the following sets the background color of the applet to white? (a) setBackColor( gray ); (b) setBackGround( gray ); (c) setBackGround( Color.gray ); (d) setBackColor( Color.gray );