Differences between Java application and Java Applet

Source: Internet
Author: User

The difference between application and Java applet.

* ********************************** Reference example *** ************************************

A: The running methods are different, the program structure is the same, the running tools are different, and the restrictions are the same.
B: The running mode is the same, the program structure is different, the running tools are different, and the restrictions are the same.
C: The running mode is the same, the program structure is the same, the running tools are different, and the restrictions are different.
D: different running modes, different program structures, different running tools, and different restrictions
**************************************** **************************************** *****

The answer is D.

Explanation:

The difference between application and Java applet.

Java is a semi-compiled and semi-interpreted language. Java User Programs are divided into two types: Java application and Java applet. These two types of programs have some differences in the composition structure and execution mechanism, mainly reflected in the following aspects:

(1) The running mode is different. Java application is a complete program that can run independently. Java Applet cannot run independently. It must be embedded into a web page written in HTML, control execution through a Java-compatible browser.

(2) Different running tools. After the Java application program is compiled, it can be interpreted and executed with a common Java interpreter. Java Applet can only be executed through a Web browser or applet observer.

(3) The program structure is different. Each Java application must contain one and only one main method. When executing a program, you must first find the main method and run it as the entry point. The class that contains the main method is often called the main class, that is, the Java application program contains a main class. The applet does not have the main class containing the main method, which is exactly why the applet cannot run independently. Although the applet does not have a main class containing the main method, the applet must have a class derived from Java. Applet. Applet, which is provided by the java system.

(4) Restricted different Java application programs can be designed to perform various operations, including reading/writing file operations, however, Java Applet neither reads nor writes the disk files of the site. However, due to the introduction of Applet, web pages have dynamic multimedia effects and interactive performance, this enables a Web page written in HTML language named Hypertext and plain text to have the hypertext function, which not only displays text information, in addition, it can have a variety of image effects and dynamic graphics effects to make the page appear vivid and beautiful. In addition, the applet adds buttons and other functions to the web page, thus increasing interaction.

The answer to this question is D.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.