0% found this document useful (0 votes)
8 views2 pages

Java Applet Inheritance and Usage Quiz

The document contains 10 multiple choice questions about Java applets: 1. The hierarchy of inheritance for Applet is JApplet, Applet, Panel, Container, Component, Object. 2. The code sample provided will output "Hello Applet world" since it extends Applet without errors. 3. The archive attribute is used to load JAR files for an applet.

Uploaded by

Devan NatRaj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Java Applet Inheritance and Usage Quiz

The document contains 10 multiple choice questions about Java applets: 1. The hierarchy of inheritance for Applet is JApplet, Applet, Panel, Container, Component, Object. 2. The code sample provided will output "Hello Applet world" since it extends Applet without errors. 3. The archive attribute is used to load JAR files for an applet.

Uploaded by

Devan NatRaj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Q1

Which hierarchy is true about Inheritance of [Link]? a. b. c. d. JApplet , Applet , Panel ,Container,Componant,Object JApplet , Applet , Panel ,Container,Componant,Object JApplet , Applet , Panel,Componant ,Container, Object JApplet , Applet ,Container, Panel ,Componant,Object

Q2

import [Link].*; import [Link].*; class MyApplet extends Applet{ public void paint(Graphics g){ [Link]("Hello Applet world",20,20); } } What is out of above program? a. Hello Applet world b. Compilation Error c. Exception d. Not loaded because class is non-public.

Q3.

What is use of archive attribute of applet tag in html. a. To load JAR. b. To load class file c. To load directive d. To load absolutes path import [Link].*; import [Link].*; public class MyApplet extends Applet{ public void paint(Object g){ [Link]("Hello Applet world",20,20); } } What is out of above program? a. Hello Applet world b. Compilation Error c. Exception FormatException d. Exception NumberFormationException

Q4.

Q5.

Applet can use setDefaultCloseOperation method to close Applet. a. True b. False setTitle method used for giving the name of web page. a. False b. True What is alternative of <applet> tag ? a. <Object> b. <archive> c. <alt> d. <param> Javascript can access to applet? a. True b. False Which <applet> tag attribute can use to be called by javascript? a. name b. Alt c. src d. rel By which way more than two applet can communicate with each-other? a. appletContext() method. b. Codebase attribute c. <object> d. <path>

Q6.

Q7.

Q8.

Q9.

Q10.

You might also like