问题 单项选择题

要将web页中的数据装载到Java应用程序中,下列哪种方式最佳

A.创建一个Socket,并使用该套接字来创建一个输入流

B.创建一个URL,并使用该URL来创建一个URL Connection

C.使用Applet小程序的showDocument()方法来装载

D.上述方法没有什么区别,所以也就没有哪个最佳

答案

参考答案:B

解析:解析:套接字适用于低级连接,使实现新的连接时。但对于诸如HTTP等现有的协议,有更适合的类――URL和URLConnection。Socket是用来实现客户与服务者之间的通信,Java在Sockel中提供多线程机制,对实现大呈客户通信带来了好处;数据报通信的协议UDP是无连接协议,它对传输数据的大小有限制,在64KB之内.它的传输不可靠,但操作简单。

单项选择题

German Chancellor Angela Merkel won over German voters in the Federal Election on Sept. 27. Can she now be won over by a French charm offensive (1) at repairing the relationship that was once at the heart of Europe That’s the question being asked in Paris, (2) top government officials are (3) talking about their desire to rekindle closer ties (4) their neighbors across the Rhine. (5) the end of World War II the Franco-German relationship has been the motor of European integration, the (6) force behind the creation of the European Union and, more recently, the introduction of the euro. But the ardor has (7) in this decade, particularly under Merkel, who has regularly struggled to (8) her irritation with French President Nicolas Sarkozy’s grandstanding. Sarkozy, (9) , has often been impatient with what he (10) Merkel’s lack of resolve.

The sometimes (11) personal rapport is a long way from the public shows of affection their predecessors staged, particularly Helmut Kohl and FranCois Mitterrand, who movingly held (12) in 1984 in a Verdun cemetery. There’s been tension on (13) , too. Charles Grant, director of the London-based think tank Centre for European Reform, points out that France and Germany have been (14) on issues from how best to reflate their economies during the economic (15) to the smartest strategies for dealing with Russia.

But influential movers in France are now (16) to put the relationship back on a friendlier footing. In a recent paper French think tank Institute Montaigne (17) an ambitious agenda for the two nations, (18) that a new impetus is needed if Europe’s voice is to be heard in a world (19) of big new players, such as Brazil and India, and at a time when President Obama seems fax more (20) with China and the rest of Asia than with America’s traditional allies in Europe.

18()

A.agreeing

B.criticizing

C.arguing

D.opposing

填空题