Java Applet concept: An applet is Java bytecode sent over HTTP and then “invoked using the HTTP protocol” on the user’s computer. Is that characterization correct?
-
AIncorrect
-
BCorrect
-
COnly correct for signed applets
-
DOnly correct in Java 1.0 browsers
Answer
Correct Answer: Incorrect
Explanation
Introduction / Context:Applets were client-side Java programs embedded in web pages and executed in a browser’s JVM plugin or applet viewer. While distribution typically occurred via HTTP, execution was performed by the local JVM under a security sandbox, not by HTTP itself.
Given Data / Assumptions:
- Applets are delivered as .class or .jar files referenced by HTML tags.
- The browser downloads resources over HTTP(S).
- Execution occurs locally inside the Java plugin/JVM, not via the network protocol.
Concept / Approach:Distinguish transport from execution: HTTP transports bytes; the JVM executes bytecode. The statement confuses these roles, implying that HTTP “invokes” the program, which is inaccurate.
Step-by-Step Solution:Load a page with an applet tag referencing a .jar.Browser fetches the file via HTTP/HTTPS.The JVM plugin loads classes and executes start() under security policies.User interacts locally; network calls (if any) use sockets/HTTP as coded.Termination occurs via stop()/destroy() lifecycle methods.
Verification / Alternative check:Observe that applets can run offline once downloaded (subject to policy), further showing execution is not “by HTTP.”
Why Other Options Are Wrong:Signed status, old browsers, or versions do not make HTTP the execution engine.
Common Pitfalls:Conflating delivery protocol with runtime; overlooking sandbox restrictions.
Final Answer:Incorrect