3 Months Free Update
3 Months Free Update
3 Months Free Update
Given the code fragment:
Path source = Paths.get(“/repo/a/a.txt”);
Path destination = Paths.get(“/repo”);
Files.move(source, destination); // line 1
Files.delete (source); // line 2
Assuming the source file and destination folder exist, what Is the result?
Examine this excerpt from the declaration of the java.se module:
What does the transitive modifier mean?
Given:
List
List
Which code fragment correctly forms a short list of words containing the letter “e”?
Given:
Which expression when added at line 1 will produce the output of 1.17?
Given the code fragment:
What change on line 1 will make this code compile?
Which two commands are used to identify class and module dependencies? (Choose two.)
Given:
Which three classes successfully override printOne()? (Choose three.)
Your organization provides a cloud server to your customer to run their Java code. You are reviewing the changes for the next release and you see this change in one of the config files:
Which is correct?
Which two interfaces are considered to be functional interfaces? (Choose two.)
Given:
and
Which two method definitions at line n1 in the Bar class compile? (Choose two.)
Given:
When run and all three files exist, what is the state of each reader on Line 1?
Given:
executed with this command:
java Main one two three
What is the output of this class?
Given:
After which line can we insert assert i < 0 || values[i] <= values[i + 1]; to verify that the
values array is partially sorted?
Given:
You want to obtain the Filechannel object on line 1.
Which code fragment will accomplish this?
A)
B)
C)
D)
Which two statements set the default locale used for formatting numbers, currency, and percentages? (Choose two.)
Given the content from the course.txt file:
Which code fragment at line 1 prints the lines that contain Java from the course.txt file?
A)
B)
C)
D)
E)
Given:
A) An exception is thrown at run time.
B)
C) The compilation fails due to an error on line 2.
D) The compilation fails due to an error on line 1.
E)
F)
The compilation fails due to an error on line 3.
Given:
LocalDate d1 = LocalDate.of(1997,2,7);
DateTimeFormatter dtf =
DateTimeFormatter.ofPattern( /*insert code here*/ );
System.out.println(dtf.format (d1));
Which pattern formats the date as Friday 7th of February 1997?
A company has an existing Java app that includes two Java 8 jar files, sales-3.10. jar and clients-10.2.jar.
The jar file ,sales -8, 10, jar reference packages in clients -10.2 jar, but clients-10.2 jar does not reference packages in sales -8.10, jar.
They have decided to modularize clients-10.2.jar.
Which module-info. Java file would work for the new library version clients-10.3 jar?
A)
B)
C)
D)