Skip to content

平成24年度 秋期 ITパスポート試験 問73

This question's explanation and your answers so far.

問73
頻出度★☆☆

Java 言語で作成したプログラムであり, Web サーバからダウンロードして, Web ブラウザ上で実行するものはどれか。

出典 平成24年度 秋期 ITパスポート試験 問73
解説

問 73

  • Incorrectア

    A Java application is a Java program that runs as standalone software on the user's computer. It is installed on a PC or similar machine in advance, and it is started and executed on the OS, unrelated to a web browser. It does not meet the condition in the question of being downloaded from a web server and executed on a web browser, so it is incorrect.

  • イ

    正解 The correct answer is イ. A Java applet is a small Java program that is placed in a web page in embedded form, downloaded from the web server to the browser when a user opens that page, and executed on the web browser on the client side. The three conditions listed in the question, namely a program written in the Java language, downloaded from a web server, and executed on a web browser, are exactly the definition of an applet. Because the processing runs on the browser side (the client side), it has the advantage that animations, input checks, and other on-screen behavior can be provided without communicating with the server again. Execution takes place under the control of the Java runtime environment built into the browser (the Java virtual machine), and its range of action is restricted so that it cannot freely read or write local files (a sandbox), which is another characteristic typical of a program that is downloaded from outside and then run. Therefore イ is correct. Note that where a Java program is executed, that is, whether on the client side or on the server side, is the deciding point for telling an applet apart from a servlet.

  • Incorrectウ

    The Java virtual machine (JVM) is the execution environment itself, which interprets and runs the intermediate code (bytecode) obtained by compiling a Java source program, and it is the foundation on which Java programs such as applets run. Its role is to absorb differences in hardware and OS so that the same bytecode can run in any environment; it is not an individual program that is downloaded from a web server and run, so it is incorrect.

  • Incorrectエ

    A Java servlet is a Java program that is deployed on the web server side (the application server side) and runs on the server in response to a request from a browser. Only the execution result, such as HTML, is returned to the browser; the program itself is not downloaded to the browser to run there. Because the place where it runs is the server side, it is the exact opposite of the condition in the question, so it is incorrect.

ここがポイント
  • Organize the types of Java programs by where they are executed. A Java applet is downloaded from the server and runs in the browser (the client side); a Java servlet resides on the server side and runs on the server; a Java application runs standalone on the user's PC, independently of the browser.
  • The Java virtual machine (JVM) is not a kind of program but an execution environment. Java compiles source code into bytecode, and the JVM on each environment executes it, which achieves high portability so that the same program runs even when the OS or hardware differs.
用語

Your answers