MCQs > IT & Programming > Java MCQs > Applet MCQs

Applet MCQ

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Java.applet defines how many interfaces?

Answer

Correct Answer: 3

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

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

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

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

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