-
What is the length of the application box made by this program?
import java.awt.*;
import java.applet.*;
public class Applet_Example extends Applet
{
Graphic graphic;
graphic.drawString("A Simple Applet",25, 25);
}
-
- Compilation Error
- Runtime Error
- Default Value
- 25
- None of these
Correct Option: A
To 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.