MCQs > IT & Programming > Java MCQs > Applet MCQs

Applet MCQ

Java Applet MCQ

1. The APPLET tag is used to start an applet from both an HTML document and from an applet viewer?

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

2. Java Plug-in software is not responsible to manage the lifecycle of an Applet?

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

3. Applet works at client side so less response time?

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

4. Which one of the following is a valid declaration of an applet?

Answer

Correct Answer: Public class MyApplet extends java.applet.Applet {

Note: This Question is unanswered, help us to find answer for this one

5. Which layout is used as their default layout by Window, Frame and Dialog classes?

Answer

Correct Answer: BorderLayout

Note: This Question is unanswered, help us to find answer for this one

6. Which of the following methods set the frame surface color to pink?

Answer

Correct Answer: SetBackground(Color.pink);

Note: This Question is unanswered, help us to find answer for this one

7. What is the color of the line, which is drawn by the following code snippet?grph.setColor(Color.red.green.yellow.red.cyan); grph.drawLine(0, 0, 100,100);

Answer

Correct Answer: Cyan

Note: This Question is unanswered, help us to find answer for this one

8. Which Called when an applet begins execution, It is the first method called for any applet?

Answer

Correct Answer: Void init()

Note: This Question is unanswered, help us to find answer for this one

9. Which Component method is used to access a component's immediate Container?

Answer

Correct Answer: GetParent()

Note: This Question is unanswered, help us to find answer for this one

10. What tags are mandatory when creating HTML to display an applet?

Answer

Correct Answer: Code, height, width

Note: This Question is unanswered, help us to find answer for this one

11. Which life cycle method of an applet java.awt.Component class provides?

Answer

Correct Answer: Public void paint(Graphics g)

Note: This Question is unanswered, help us to find answer for this one

12. In the following statements which is a drawback for Applet?

Answer

Correct Answer: Plugin is required at client browser to execute applet

Note: This Question is unanswered, help us to find answer for this one

13. What is the immediate super class of Applet class?

Answer

Correct Answer: Panel

Note: This Question is unanswered, help us to find answer for this one

14. The java.applet.Applet class 4 life cycle methods and java.awt.Component class provides how many life cycle methods for an applet?

Answer

Correct Answer: 1

Note: This Question is unanswered, help us to find answer for this one

15. Which is the correct order for lifecycle of an applet?

Answer

Correct Answer: Applet is initialized,started,painted,stopped,destroyed

Note: This Question is unanswered, help us to find answer for this one

16. Java.applet defines how many interfaces?

Answer

Correct Answer: 3

Note: This Question is unanswered, help us to find answer for this one

17. To determine the width and height of an application, which of the following method is used?

Answer

Correct Answer: GetSize()

Note: This Question is unanswered, help us to find answer for this one

18. Which method is called only once during the run time of your applet?

Answer

Correct Answer: Init()

Note: This Question is unanswered, help us to find answer for this one

19. All Applets must import java.applet and java.awt.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

20. Which of the following components allow multiple selections?

Answer

Correct Answer: Non-exclusive Checkboxes

Note: This Question is unanswered, help us to find answer for this one