下面的程序是列出目录C:\Test中所有的.txt文件,请将程序补充完整。 imp

题型:填空题

问题:

下面的程序是列出目录C:\Test中所有的.txt文件,请将程序补充完整。
import java.io.*; //引入java.io包中所有的类
public class FileFilterTest
public static void main(String args[])
File dir=new File("C://Test");
Filter filter=new Filter("txt");
System.out.println("list java files in directory" +dir);
String files[]=dir.list(filter);
for(int i=0;i<files.length;i++)
File f=______;//为目录dir下的文件或目录创建一个File对象
if(f.isFile())
System.out.println("file "+f);
else
System.out.println("sub directory" +f);



class Filter implements FilenameFilter
String extent;
Filter(String extent)
this.extent=extent;

public boolean accept(File dir,String name)
return name.endsWith("."+extent);//返回文件的后缀名

考点:计算机等级考试JAVA二级JAVA笔试
题型:填空题

The year was 1932. Amelia Earhart was flying alone from North America to England in a small single-engined aeroplane. At midnight, several hours after she had left Newfoundland, she ran into bad weather. To make things worse, her altimeter(高度表) failed and she didn’t know how high she was flying. At night, and in a storm, a pilot is in great difficulty without an altimeter. At times, her plane nearly plunged into the sea.

Just before dawn, there was further trouble. Amelia noticed flames coming from the engine. Would she be able to reach land? There was nothing to do except to keep going and to hope.

In the end, Amelia Earhart did reach Ireland, and for the courage she had shown, she was warmly welcomed in England and Europe. When she returned to the United States, she was honored by President Hoover at a special dinner in the White House. From that time on, Amelia Earhart was famous.

What was so important about her flight? Amelia Earhart was the first woman to fly the Atlantic Ocean alone, and she had set a record of fourteen hours and fifty-six minutes.

In the years that followed, Amelia Earhart made several flights across the United States, and on each occasion she set a new record for flying time. Amelia Earhart made these flights to show that women had a place in aviation (航空) and that air travel was useful.

小题1:Which of the following statements is NOT the difficulty which Amelia Earhart met in her flight from north America to England?

A.She lost her direction.

B.The altimeter went out of order.

C.Her engine went wrong.

D.She was caught in a storm.小题2:When Amelia Earhart saw flames coming from the engine, what did she do?

A.She did nothing but pray for herself.

B.She changed her direction and landed in Ireland.

C.She continued flying.

D.She lost hope of reaching land.小题3:Which of the following statements was NOT mentioned?

A.She was the first woman who succeeded in flying across the Atlantic Ocean alone.

B.She made plans to fly around the world.

C.She was warmly welcomed in England, Europe and the United States.

D.She showed great courage in overcoming the difficulties during the flight.小题4: Which of the following would be the best title for the passage?

A.Amelia Earhart—First Across the Atlantic

B.Amelia Earhart—Pioneer in Women’s Aviation

C.A New Record for Flying Time

D.A Dangerous Flight from North America to England

题型:填空题

总分机构不在同一县(市)的增值税纳税人,经批准可由总机构向其所在地主管税务机关统一办理一般纳税人认定手续。 ( )

题型:填空题

维护国家安全主要包括哪些内容( )

A.积极防范危害国家安全的违法犯罪行为的发生

B.及时发现和制止危害国家安全的违法犯罪行为,将其遏制在萌芽状态,以避免造成危害国家安全的严重后果

C.坚决打击和惩治危害国家安全的违法犯罪分子,使他们得到应有的惩罚,同时也警戒其他不法分子

D.积极防范和制止危害社会治安秩序的违法犯罪行为

题型:填空题

治疗肺痈咳吐脓血,热毒疮疡,其功效是()

A.祛风散寒除湿

B.燥湿健脾

C.清热解毒,排脓

D.回阳,温肺化痰

E.清热利尿通淋

题型:填空题

在总账期末处理中,在执行“结转本期损益”功能时,所有定义为非“损益类”的科目的本期实际发生额都将全部自动结转。

更多题库