-
What is the length of the application box made by this program?
import java.awt.*;
import java.applet.*;
public class Newapplet extends Applet
{
Graphic G;
G.drawString("A Simple Applet created...",100,100);
}
-
- A Simple Applet created...
- 10
- 100
- Compilation Error
- Runtime Error
Correct Option: D
o implement the method drawString we need first need to define abstract method of AWT that is paint() method. Without paint() method we cannot define and use drawString or any Graphic class methods.