网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

关于File类中的exists()方法说法错误的是()。

  • A、 判断File对象中封装的路径所对应的文件或者文件夹是否存在
  • B、 此方法返回boolean类型值
  • C、 判断File对象封装的路径是否是相对路径
  • D、 判断File对象封装的路径是否是绝对路径

参考答案

更多 “关于File类中的exists()方法说法错误的是()。A、 判断File对象中封装的路径所对应的文件或者文件夹是否存在B、 此方法返回boolean类型值C、 判断File对象封装的路径是否是相对路径D、 判断File对象封装的路径是否是绝对路径” 相关考题
考题 ●以下关于类继承的说法中,错误的是(6)。(6)A.通过类继承,在程序中可以复用基类的代码B.在继承类中可以增加新代码C.在继承类中不能定义与被继承类(基类)中的方法同名的方法D.在继承类中可以覆盖被继承类(基类)中的方法

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

考题 下列叙述中,错误的是A.File类能够存储文件B.File类能够读写文件C.File类能够建立文件D.File类能够获取文件目录信息

考题 下面哪项不是File类的构造方法() A、File(StringfileName)B、File(Filedirectory)C、File(Stringdirectory,StringfileName)D、File(Filedirectory,StringfileName)

考题 以下关于File对象的描述中,错误的是() A.File对象是不可变的,一旦创建,它所指向的文件就不能改变;B.File对象不一定要指向实际存在的文件或文件夹;C.File类具有强大的文件和文件夹操作能力;D.File对象的功能仅限于关于文本文件;

考题 ● 以下关于类继承的说法中,错误的是( )。A.通过类继承,在程序中可以复用基类的代码B.在继承类中可以增加新代码C.在继承类中不能定义与被继承类(基类)中的方法同名的方法D.在继承类中可以覆盖被继承类(基类)中的方法

考题 下列关于流类和File类的说法中错误的一项是______。A.File类可以重命名文件B.File类可以修改文件内容C.流类不可以新建目录D.流类可以修改文件内容

考题 下列关于控件类和窗口类的说法中,错误的是

考题 下列关于静态方法的说法,错误的是() A、 静态方法不对特定实例进行操作,不与实例相关联B、 使用静态方法的语法格式:类名.静态方法(实参列表)C、 静态方法只能访问类中的静态成员,不能访问非静态成员D、 静态方法不能访问类中的静态成员

考题 关于类说法正确的是()A、类中可以有构造方法B、类中可以有析构方法C、类中可以有类变量D、类变量只能被类调用

考题 以下关于File对象的描述中,错误的是()A、File对象是不可变的,一旦创建,它所指向的文件就不能改变;B、File对象不一定要指向实际存在的文件或文件夹;C、File类具有强大的文件和文件夹操作能力;D、File对象的功能仅限于关于文本文件;

考题 File类中的listFiles()方法说法正确的是()。A、 获取File对象封装的路径下的全部文件和文件夹对象B、 只获取File对象封装的路径下的文件C、 该方法返回File类型数组D、 该方法返回String类型数组

考题 以下关于File类的叙述,哪两项正确?()A、File类位于java.io包中B、创建一个File类的实例将导致打开指定文件进行读写C、File实例不能用于封装目录D、File实例封装了指定文件的信息

考题 File类中的isDirectory()方法的作用是()。A、 判断File对象封装的是否是文件B、 判断File对象封装的是否是目录C、 判断File对象中封装的是否是根目录D、 返回值类型是boolean

考题 以下关于类继承的说法中,错误的是()。A、通过类继承,在程序中可以复用基类的代码B、在继承类中可以增加新代码C、在继承类中不能定义与被继承类(基类)中的方法同名的方法D、在继承类中可以覆盖被继承类(基类)中的方法

考题 使用Dirctory类的下列方法,可以获取指定文件夹中的文件的是().A、Exists()B、GetFiles()C、GetDirectories()D、CreateDirectory()

考题 File类提供了许多管理磁盘的方法。其中,建立目录的方法是()A、delete()B、mkdirs()C、makedir()D、exists()

考题 Which of the following will occur if an operator types the command vi file.out?()A、If the file exists it will be opened for editing. If the file does not exist an error message will be displayed.B、If the file exists it will be opened for editing. If the file does not exist a new file with the name file.out will be created and opened for editing.C、If the file exists an error message will be displayed. If the file does not exist a new file with the name file.out will be created and opened for editing.D、If the file exists the operator will be asked whether to open the file or overwrite the file. If the file does not exist a new file with the name file.out will be created and opened for editing.

考题 Which determines if “prefs” is a directory and exists on the file system?()  A、 Boolean exists=Directory.exists (“prefs”);B、 Boolean exists=(new File(“prefs”)).isDir();C、 Boolean exists=(new Directory(“prefs”)).exists();D、 Boolean exists=(new File(“prefs”)).isDirectory();E、 Boolean exists=true;  Try{  Directory d = new Directory(“prefs”);  } catch (FileNotFoundException e) {  exists = false;  }

考题 单选题Which statements are true, given the code new FileOutputStream("data", true) for creating an object of class FileOutputStream?()A FileOutputStream has no constructors matching the given arguments.B An IOExeception will be thrown if a file named data already exists.C An IOExeception will be thrown if a file named data does not already exist.D If a file named data exists, its contents will be reset and overwritten.E If a file named data exists, output will be appended to its current contents.

考题 单选题关于Database类,下列选项中说法错误的是()。A Database类是抽象类,提供了数据访问中的统一的接口B Database类提供的方法可以适用于任何数据库C Database类的GetSqlStringCommand()方法是实例方法D Database类是SqlDatabase的子类

考题 单选题Which determines if “prefs” is a directory and exists on the file system?()A  Boolean exists=Directory.exists (“prefs”);B  Boolean exists=(new File(“prefs”)).isDir();C  Boolean exists=(new Directory(“prefs”)).exists();D  Boolean exists=(new File(“prefs”)).isDirectory();E  Boolean exists=true;  Try{  Directory d = new Directory(“prefs”);  } catch (FileNotFoundException e) {  exists = false;  }

考题 单选题下列关于修饰符混用的说法,错误的是()。A abstract不能与final并列修饰同一个类B abstract类不能有自己的构造方法C abstract方法所在的类必须是abstract类D static方法中能处理非static的属性

考题 单选题Which of the following will occur if an operator types the command vi file.out?()A If the file exists it will be opened for editing. If the file does not exist an error message will be displayed.B If the file exists it will be opened for editing. If the file does not exist a new file with the name file.out will be created and opened for editing.C If the file exists an error message will be displayed. If the file does not exist a new file with the name file.out will be created and opened for editing.D If the file exists the operator will be asked whether to open the file or overwrite the file. If the file does not exist a new file with the name file.out will be created and opened for editing.

考题 多选题File类中的listFiles()方法说法正确的是()。A获取File对象封装的路径下的全部文件和文件夹对象B只获取File对象封装的路径下的文件C该方法返回File类型数组D该方法返回String类型数组

考题 多选题关于File类中的exists()方法说法错误的是()。A判断File对象中封装的路径所对应的文件或者文件夹是否存在B此方法返回boolean类型值C判断File对象封装的路径是否是相对路径D判断File对象封装的路径是否是绝对路径

考题 多选题File类中的isDirectory()方法的作用是()。A判断File对象封装的是否是文件B判断File对象封装的是否是目录C判断File对象中封装的是否是根目录D返回值类型是boolean