Online Access Free 1Z0-805 Practice Test
| Exam Code: | 1Z0-805 |
| Exam Name: | Upgrade to Java SE 7 Programmer |
| Certification Provider: | Oracle |
| Free Question Number: | 90 |
| Posted: | Jun 03, 2026 |
Given the code fragment:
public class App {
public static void main (String [] args) {
path path = paths.get("C\\educations\\institute\\student\\report.txt");
system.out.printIn("getName(0): %s", path.getName(0));
system.out.prinIn("subpath(0, 2): %s" path.subpath(0, 2));
}
}
What is the result?
Given:
import java.io.*;
public class SampleClass {
public static void main(String[] args) throws IOException {
try {
String dirName = args[0];
File dir = new File(dirName);
File.createTempFile("temp", "log", dir);
} catch (NullPointerException | IOException e) {
e = new IOException("Error while creating temp file");
throw e;
}
}
}
What is the result?