( )方法用于获取文件绝对路径。
参考答案(由小熊题库网聘请的专业题库老师提供的解答)
请点击↑↑↑ 查看官方参考答案 按钮
习题解析
请点击 查看官方参考答案 按钮
您可能感兴趣的题目
1 .for语句括号内的( )部分都是可选的,条件表达式为空时,默认规定为恒真。
A 1个 B 2个 C 3个 D 4个
2 .当在应用程序中只用到一个文件时,使用( )构造方法最为实用。
A File myFile;myFile = new File(“mymotd”); B myFile = new File(“/”,”mymotd”); C File myDir= new File(”/”);myFile = new File(myDir,”mymotd”); D File myDir= new File(”/”);
3 .获取文件名使用的方法是( )。
A String getName() B String getPath() C String getAbsolutePath() D String getParent()
4 .获取文件父目录名称的方法是( )。
A String getName() B String getPath() C String getAbsolutePath() D String getParent()
5 .( )方法用于获取文件路径。
A String getName() B String getPath() C String getAbsolutePath() D String getParent()
7 .boolean isFile()方法用于测定( )。
A 文件对象是否存在 B 文件对象是否可写 C 文件对象是否可读 D 文件对象是否是文件
8 .用于获取文件长度的方法是( )。
A long lastModified () B boolean delete() C long length() D boolean isDirectory()
9 .用( )方法可以一次生成多个层次的子目录。
A boolean mkdir() B boolean mkdirs() C String[] list() D boolean exists()
10 .可以返回文件指针的当前位置的方法是( )。
A boolean mkdir() B boolean mkdirs() C long getPointer() D long getFilePointer()
