Applets - Java (MCQ) questions and answers

1)   In Servlet Terminology what provides runtime environment for JavaEE (j2ee) applications. It performs many operations that are given below:

1. Life Cycle Management
2. Multithreaded support
3. Object Pooling
4. Security etc.

- Published on 19 Oct 15

a. Server
b. Webserver
c. Container
d. Application Server
Answer  Explanation 

ANSWER: Container

Explanation:
No explanation is available for this question!


2)   The following example shows the creation of a
import java.applet.*;
import java.awt.*;

public class Main extends Applet{
public void paint(Graphics g){
g.drawString("Welcome in Java Applet.",40,20);
}
}

- Published on 19 Oct 15

a. Banner using Applet
b. Basic Applet
c. Display clock
d. None of the above
Answer  Explanation 

ANSWER: Basic Applet

Explanation:
No explanation is available for this question!


3)   An applet can play an audio file represented by the AudioClip interface in the java, applet package Causes the audio clip to replay continually in which method?

- Published on 19 Oct 15

a. public void play()
b. public void loop()
c. public void stop()
d. None of the above
Answer  Explanation 

ANSWER: public void loop()

Explanation:
No explanation is available for this question!


4)   Which are the common security restrictions in applets?
- Published on 19 Oct 15

a. Applets can't load libraries or define native methods
b. An applet can't read every system property
c. Applets can play sounds
d. Both A & B
Answer  Explanation 

ANSWER: Both A & B

Explanation:
No explanation is available for this question!


5)   From the following statements which is a drawback for Applet?
- Published on 22 Jul 15

a. It works at client side so less response time
b. Secured
c. It can be executed by browsers running under many platforms, including Linux, Windows, and Mac Os etc.
d. Plugin is required at client browser to execute applet
Answer  Explanation 

ANSWER: Plugin is required at client browser to execute applet

Explanation:
No explanation is available for this question!


6)   Applet works at client side so less response time.
- Published on 22 Jul 15

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


7)   The APPLET tag is used to start an applet from both an HTML document and from an applet viewer.
- Published on 21 Jul 15

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


8)   Applets cannot make network connection exception to the server host from which it originated.
- Published on 20 Jul 15

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


9)   What invokes immediately after the start() method and also any time the applet needs to repaint itself in the browser?
- Published on 20 Jul 15

a. stop()
b. init()
c. paint()
d. destroy()
Answer  Explanation 

ANSWER: paint()

Explanation:
No explanation is available for this question!


10)   Which method is called only once during the run time of your applet?
- Published on 17 Jul 15

a. stop()
b. paint()
c. init()
d. destroy()
Answer  Explanation 

ANSWER: init()

Explanation:
No explanation is available for this question!


1 2 3