Question 13

Which of the followingisn'ta correct way to write a string to a file?

Correct Answer:B

Question 14

Which of the following isn't a valid option of the jdeps command?

Correct Answer:A

Question 15

Given: java
var now = LocalDate.now();
var format1 = new DateTimeFormatter(ISO_WEEK_DATE); var format2 = DateTimeFormatter.ISO_WEEK_DATE;
var format3 = new DateFormat(WEEK_OF_YEAR_FIELD);
var format4 = DateFormat.getDateInstance(WEEK_OF_YEAR_FIELD);
System.out.println(now.format(REPLACE_HERE));
Which variable prints 2025-W01-2 (present-day is 12/31/2024)?

Correct Answer:B

Question 16

A module com.eiffeltower.shop with the related sources in the src directory.
That module requires com.eiffeltower.membership, available in a JAR located in the lib directory.
What is the command to compile the module com.eiffeltower.shop?

Correct Answer:B

Question 17

What is the output of the following snippet? (Assume the file exists) java
Path path = Paths.get("C:\home\joe\foo"); System.out.println(path.getName(0));

Correct Answer:E

Question 18

Given: java
try (FileOutputStream fos = new FileOutputStream("t.tmp"); ObjectOutputStream oos = new ObjectOutputStream(fos)) { fos.write("Today");
fos.writeObject("Today"); oos.write("Today"); oos.writeObject("Today");
} catch (Exception ex) {
// handle exception
}
Which statement compiles?

Correct Answer:D

START 1z0-830 EXAM