FileSystem Object有两个方法,分别为CreatText File方法和OpenText File方法。

题目

FileSystem Object有两个方法,分别为CreatText File方法和OpenText File方法。

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

下列InputStream构造方法正确的是()。

A、InputStream in=new FileReader(“file.txt”)

B、InputStream in=new FileInputStream(“file.txt”)

C、InputStream in=new InputStreamFileReader (“file.txt”,“read”)

D、FileInputStream in=new FileReader(new File(“file.txt”))


参考答案:C

第2题:

A user reports that they are getting an error when trying to save a video file to a share on a server running Windows Server 2003. The administrator looks at the file and finds that it is 5GB. The administrator checks the server and finds that the server has 100GB of free space. This file needs to be saved on the server.Which of the following should the administrator do to accomplish this?()

A. Convert the filesystem to EXT3.

B. Convert the filesystem to VMFS.

C. Convert the filesystem to NTFS.

D. Convert the filesystem to FAT32.


参考答案:C

第3题:

File类中,获得文件路径的方法是______。


正确答案:getPath()
getPath()

第4题:

File类中的listFiles()方法说法正确的是()。

  • A、 获取File对象封装的路径下的全部文件和文件夹对象
  • B、 只获取File对象封装的路径下的文件
  • C、 该方法返回File类型数组
  • D、 该方法返回String类型数组

正确答案:A,C

第5题:

用面向对象方法设计了一个父类File和两个子类DiskFile和TapeFile,这两个子类继承了其父类的open方法,并给出不同的实现。不同的子类执行open方法时,有不同的行为,这种机制称为( )。

A.继承
B.消息传递
C.多态
D.关联

答案:C
解析:
本题考查面向对象方法中多态性的基础知识。多态:一个基类的引用符,可以指向多种派生类对象,具有多种不同的形态,这种现象叫多态性。题干里的描述是面向对象的“多态”机制。故正确答案为C

第6题:

下面哪项不是File类的构造方法()

A、File(StringfileName)

B、File(Filedirectory)

C、File(Stringdirectory,StringfileName)

D、File(Filedirectory,StringfileName)


参考答案:B

第7题:

The(72)turns the source file into an object file and the(73)turns the object file into an executable file.

A.translator

B.compiler

C.interpreter

D.linker


正确答案:B
解析:译文:编译程序将源文件转换成目标文件,连接程序将目标文件转换成可执行文件。

第8题:

下面创建一个新文件对象方法错误的是( )。

A.File myFile; myFile=new File("mulu/file");

B.File myFile=new File();

C.myFile=new FileC/mulu","filel");

D.File myDir=new file("/mulu"); myFile=new File(Dir, "filer');


正确答案:B

第9题:

An application writes to a log file in the /logs filesystem that is full. After the log file is deleted, 'df' still shows the filesystem as 100% full. What is the likely cause of the problem and what will resolve it?()

  • A、The deleted file is still open by the application.The system must be rebooted before'df' will show the reduction in the filesystem.
  • B、The deleted file is still open by the application.The application must be stoppedbefore 'df' will show the reduction in the filesystem.
  • C、The filesystem is still marked as full in the /etc/fs.status file.The system must be rebooted before 'df' will show the reduction in the filesystem.
  • D、The filesystem is still marked as full in the /etc/fs.status file.The application must be stopped before 'df' will show the reduction in the filesystem.

正确答案:B

第10题:

File类提供实现文件读写的操作方法。


正确答案:正确

更多相关问题