多做题,通过考试没问题!

全国信息技术应用考试

睦霖题库>大学试题(计算机科学)>全国信息技术应用考试

为文件c:/java/example/file.txt建立File对象file1可以采用()语句序列。

  • A、File file 1=new File(“c://java//example//file.txt”)
  • B、String path=”c:/java/example/”Filefile1=newFile(path,”oldfile.txt”)
  • C、File dir 1=new File(“c://java//example”)Filefile1=newFile(dir1,”oldfile.txt”)
  • D、File file 1=new File(“c:/java//example/file.txt”)
正确答案:A,B,C
答案解析:
进入题库查看解析

微信扫一扫手机做题