[单选题]
获取文件名使用的方法是( )。
A .String getName()
B .String getPath()
C .String getAbsolutePath()
D .String getParent()
参考答案(由小熊题库网聘请的专业题库老师提供的解答)
请点击↑↑↑ 查看官方参考答案 按钮
习题解析
请点击 查看官方参考答案 按钮
您可能感兴趣的题目
1 .一个源文件中如果有多个类,则最多只能有一个是( )的类,且该源文件的名字即为这个公有类的名字,且大小写也要一致。
A package语句 B import语句 C public类型 D for类型
题型:
单选题
提问时间:
2021-08-25
2 .在循环语句中,( )可以立即结束当次循环。
A break语句 B continue语句 C if语句 D go语句
题型:
单选题
提问时间:
2021-08-25
3 .复合语句是一对( )括起来的语句组,也称为“块”。
A 小括号 B 大括号 C 中括号 D 圆
题型:
单选题
提问时间:
2021-08-25
4 .for语句括号内的( )部分都是可选的,条件表达式为空时,默认规定为恒真。
A 1个 B 2个 C 3个 D 4个
题型:
单选题
提问时间:
2021-08-25
5 .当在应用程序中只用到一个文件时,使用( )构造方法最为实用。
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(”/”);
题型:
单选题
提问时间:
2021-08-25
7 .获取文件父目录名称的方法是( )。
A String getName() B String getPath() C String getAbsolutePath() D String getParent()
题型:
单选题
提问时间:
2021-08-25
8 .( )方法用于获取文件路径。
A String getName() B String getPath() C String getAbsolutePath() D String getParent()
题型:
单选题
提问时间:
2021-08-25
9 .( )方法用于获取文件绝对路径。
A String getName() B String getPath() C String getAbsolutePath() D String getParent()
题型:
单选题
提问时间:
2021-08-25
10 .boolean isFile()方法用于测定( )。
A 文件对象是否存在 B 文件对象是否可写 C 文件对象是否可读 D 文件对象是否是文件
题型:
单选题
提问时间:
2021-08-25
