Syvum Home Page

Home > Quiz Games > Java Programming > Print Preview

Java Programming : Applets: True or False

Formats Info Page Worksheet / Test Paper Quiz Review
Table

Try the Quiz : Java Programming : Applets: True or False

About Button apid Just what you need to know!
eview

QuestionAnswerExplanation
An applet may not create frames (instances of java.awt.Frame class).
• True
• False
FalseWhile applets must themselves reside within the browser, they may create other frames.
An applet is an instance of the Panel class in package jawa.awt.
• True
• False
TrueApplets are small programs, meant not to run on their own but be embedded inside other applications (such as a web browser). All applets are derived from the class java.applet.Applet, which in turn is derived from java.awt.Panel.
The class file of an applet specified using the CODE parameter in an <APPLET> tag must reside in the same directory as the calling HTML page.
• True
• False
FalseThe CODE parameter can specify complete or relative path of the location of the class file.
If getParameter method of an instance of java.applet.Applet class returns null, then an exception of type a NullPointerException is thrown.
• True
• False
FalseA NullPointerException is thrown only when a null value is used in a case where an object is required. For instance, trying to execute the equals method on a String object when the object is null.
Applets loaded over the internet have unrestricted access to the system resources of the computer where they are being executed.
• True
• False
FalseDue to security reasons, applets run under a restricted environment and cannot perform many operations, such as reading or writing to files on the computer where they are being executed.
An applet may be able to access some methods of another applet running on the same page.
• True
• False
TrueOnly public methods can be accessed in such a fashion.
The SecurityManager object is responsible for implementing the security policies for applets.
• True
• False
TrueEach browser has a SecurityManager that controls the access to system resources by applets. A SecurityException is thrown when a violation is detected.
One of the popular uses of applets involves making connections to the host they came from.
• True
• False
TrueAn example of this feature can be implementation of a chat functionality.
Applets loaded from the same computer where they are executing have the same restrictions as applets loaded from the network.
• True
• False
FalseApplets loaded and executing locally have none of the restrictions faced by applets that get loaded from the network.
The methods init, start, stop and destroy are the four major events in the life of an applet.
• True
• False
TrueThese methods initialize, start the execution, stop the execution, and perform the final cleanup respectively. Not each of these methods may be overridden in every applet.
Applets are not allowed to have contsructors due to security reasons.
• True
• False
FalseApplets may have constructors, but usually don't as they are not guaranteed to have access to the environment until their init method has been called by the environment.

Try the Quiz : Java Programming : Applets: True or False


Contact Info © 1999-2024 Syvum Technologies Inc. Privacy Policy Disclaimer and Copyright
Previous
-
Next
-