Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. 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);    
    }
    }
  2. A.
    20
    B.
    50
    C.
    100
    D.
    System dependent

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    the code in pain() method “ g.drawString("A Simple Applet,20,20); draws a applet box of length 20 and width 20.


Be The First To Comment