Difficulty: Easy
Correct Answer: A Java applet
Explanation:
Introduction:
Before modern client-side frameworks became dominant, small Java programs called applets were embedded in web pages and executed on the user’s machine via a browser plugin or the Java Plug-in. This question distinguishes applets from server-side components such as servlets.
Given Data / Assumptions:
Concept / Approach:
Applets are client-side Java programs downloaded to the browser and executed locally. Servlets, in contrast, run on the server under a servlet container (for example, Tomcat). A generic “Java application” is not specifically delivered and launched via the browser; it typically runs as a standalone program. Therefore, the description clearly matches a Java applet.
Step-by-Step Solution:
1) Identify where the code runs (client vs. server).2) Map client-side downloaded execution to the “applet” concept.3) Exclude server-side servlet execution.4) Select “A Java applet.”
Verification / Alternative check:
Historic Java web tutorials describe the applet lifecycle (init, start, stop, destroy) and the need for a browser plug-in or appletviewer, affirming client-side execution after HTTP delivery.
Why Other Options Are Wrong:
Common Pitfalls:
Conflating where code runs; applets (client) vs. servlets/JSF (server).
Final Answer:
A Java applet
Discussion & Comments