填空使代码编译通过public String getPathName(String fileName) {final Path p =__________ ;return p.getFileName();}I. new File(fileName).toPath()II. new Path(fileName)III. FileSystems.getDefault().getPath(fileName)
A: A. I 和 II
B: B. I 和 III
C: C. II
D: D. 以上都不是
A: A. I 和 II
B: B. I 和 III
C: C. II
D: D. 以上都不是
举一反三
- 下面不属于File类构造方法的是()。 A: File(String filename) B: File(String directoryPath,String filename) C: File(File f, String filename) D: File( )
- 【单选题】比较苯酚 (I) 、环己醇 (II) 、碳酸 (III) 酸性的大小 : A. II>I>III B.III>I>II C. I>II>III D. II>III>I A. II>I>III B. III>I>II C. I>II>III D. II>III>I
- Which of the following can prevent markets from reaching the efficient level of production? I. a monopoly II. taxes III. the product is a public good ( ) A: I and II B: II C: II and III D: I, II and III E: a monopoly I taxes III. the<br/>product is a public good ( D )
- 下列__________说法是正确的?I:File file = new File("input.txt");try (Scanner input = new Scanner(file)) { String line = input.nextLine();}II:try (File file = new File("input.txt"); Scanner input = new Scanner(file);) { String line = input.nextLine();}III:File file;try (file = new File("input.txt"); Scanner input = new Scanner(file);) { String line = input.nextLine();}IV:File file;Scanner input;try (file = new File("input.txt"); input = new Scanner(file);) { String line = input.nextLine();} A: I B: II C: III D: IV
- 船舶操纵信号设备主要包括()。I.电气传令钟;II.舵角指示器;III.船用电动转速表。 A: I、II B: I、III C: II、III D: I、II、III