Sail E0 Webinar
Question


What is the length of the application box made by this program?


import java.awt.*;
import java.applet.*;
public class myapplet extends Applet {
public void paint(Graphics g) {
g.drawString("A Simple Applet", 20, 20);
}
}
Options:
A .  20
B .  50
C .  100
D .  System dependent
Answer: Option A

the code in pain() method - g.drawString("A Simple Applet",20,20); draws a applet 

box of length 20 and width 20.




Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers