问题 单项选择题

下列关于Java Application与Java Applet程序的差别描述正确的是( )。

A) 运行方式不同,程序结构相同,运行工具不同,受到的限制相同
B) 运行方式相同,程序结构不同,运行工具不同,受到的限制相同
C) 运行方式相同,程序结构相同,运行工具不同,受到的限制也不同
D) 运行方式不同,程序结构不同,运行工具不同,受到的限制也不同

答案

参考答案:D

解析: Application和Java Applet的区别。
Java语言是一种半编译半解释的语言。Java的用户程序分为两类:Java Application和Java Applet。这两类程序在组成结构和执行机制上都有一定的差异,主要体现在以下几方面:
(1)运行方式不同。Java Application是完整的程序,可以独立运行;Java Applet程序不能单独运行,它必须嵌入到用HTML语言编写的Web页面中,通过与Java兼容的浏览器来控制执行。
(2)运行工具不同。Java Application程序被编译以后,用普通的Java解释器就可以使其边解释边执行,而Java Applet必须通过网络浏览器或者Applet观察器才能执行。
(3)程序结构不同。每个Java Application程序必定含有一个并且只有一个main方法,程序执行时,首先寻找main方法,并以此为入口点开始运行。含有main方法的那个类,常被称为主类,也就是说,Java Application程序都含有一个主类。而Applet程序则没有含main方法的主类,这也正是Applet程序不能独立运行的原因。尽管Applet没有含main方法的主类,但Applet一定有一个从java. applet. Applet派生的类,它是由Java系统提供的。
(4)受到的限制不同。Java Application程序可以设计成能进行各种操作的程序,包括读/写文件的操作,但是Java Applet对站点的磁盘文件既不能进行读操作,也不能进行写操作。然而,由于Applet的引入,使Web页面具有动态多媒体效果和可交互性能,这使由名为超文本、实为纯文本的HTML语言编写成的Web页面真正具有了超文本功能,不但可以显示文本信息,而且还可以有各种图片效果和动态图形效果,从而使页面显得生动美丽;另外,Applet使Web页面增加了按钮等功能,从而增加了交互性。

阅读理解

阅读理解.

     Tea drinking was common in China for nearly one thousand years before anyone in Europe

had ever heard about tea.People in Britain were much slower in finding out what tea was like,

mainly because tea was very expensive. It could not be bought in shops and even those people

who could afford to have it sent from Holland did so only because it was a fashionable curiosity.

Some of them were not sure how to use it. They thought it was a vegetable and tried cooking

the leaves. Then they served them mixed with butter and salt. They soon discovered their

mistake but many people used to spread the used tea leaves on bread and give them to their

children as sandwiches.

     Tea remained scarce (缺少的) and very expensive in England until the ships of the East

India Company began to bring it direct from China early in the seventeenth century. During

the next few years so much tea came into the country that the price fell and many people could

afford to buy it.

     At the same time people on the Continent were becoming more and more fond of tea.

Until then tea had been drunk without milk in it, but one day a famous French lady named

Madame de Sevigne decided to see what tea tasted like when milk was added.She found

it so pleasant that she would never again drink it without milk. Because she was such a great

lady her friends thought they must copy everything she did, so they also drank their tea with

milk in it. Slowly this habit spread until it reached England and today only very few Britons

drink tea without milk.

     At first, tea was usually drunk after dinner in the evening. No one ever thought of drinking

tea in the afternoon until a duchess (公爵夫人) found that a cup of tea and a piece of cake

at three or four o'clock stopped her getting "a sinking feeling" as she called it. She invited her

friends to have this new meal with her and so tea-time was born.

1.Which of the following is true of the introduction of tea into Britain?_____

A. The Britons got expensive tea from India.

B. Tea reached Britain from Holland.

C.The Britons were the first people in Europe who drank tea.

D.It was not until the 17th century that the Britons had tea.

2.This passage mainly discusses______.

A.the history of tea drinking in Britain

B.how tea became a popular drink in Britain

C.how the Britons got the habit of drinking tea

D.how tea-time was born

3.Tea became a popular drink in Britain.______

A.in eighteenth century

B.in sixteenth century

C.in seventeenth century

D.in the late seventeenth century

4.People in Europe began to drink tea with milk because._____

A.it tasted like milk

B.it tasted more pleasant

C.it became a popular drink

D.Madame de Sevinge was such a lady with great social influence that people tried to

copy the way she drank tea

5.We may infer from the passage that the habit of drinking tea in Britain was mostly due

to the influence of_______.

A.a famous French lady

B.the ancient Chinese

C.the upper social class

D.people in Holland

多项选择题 共用题干题