niusouti.com
参考答案和解析
正确答案:getPath()
getPath()
更多“File类中,获得文件路径的方法是______。 ”相关问题
  • 第1题:

    File对象获得其指代的文件对象的的字符串类型的绝对路径的方法是?

    A.getPath

    B.getAbsolutePath

    C.getAbsoluteFile

    D.getParent


    B

  • 第2题:

    7、File类的Create方法在指定的路径中创建文件时,若文件已存在会产生异常。


    错误

  • 第3题:

    WordCloud类的to_file方法的功能是:

    A.to_file(filename)将词云图片保存为名为filename的文件

    B.to_file(filename)生成词云的字体文件路径

    C.to_file(filename)生成词云的形状为filename

    D.to_file(filename)在filename路径下生成词云


    to_file(filename) 将词云图片保存为名为 filename 的文件

  • 第4题:

    (File类)在File 类中,能返回字符串形式的文件路径名的方法是________。

    A.getParent

    B.getName

    C.getParentFile

    D.getPath


    getPath

  • 第5题:

    File类中以字符串形式返回文件绝对路径的的方法是_______。

    A.getParent()

    B.getName()

    C.getAbsolutePath()

    D.getPath()


    getAbsolutePath()