Given the code fragment:
What is the result?
Given the code fragment:
What is the result?
Given:
Which statement is true about the Fox class?
Given the code fragment:
You want to examine whether path is a directory.
Which code inserted on line 1 will accomplish this?
Given:
var data = new ArrayList<>();
data.add(“Peter”);
data.add(30);
data.add(“Market Road”);
data.set(1, 25);
data.remove(2);
data.set(3, 1000L);
System.out.print(data);
What is the output?
Given:
Which is true about line 1?
Given:
What is the result?
Which method throws an exception for not-a-number and infinite input values?
A)
B)
C)
D)
Given the declaration:
Which two annotations may be applied at Loc1 in the code fragment? (Choose two.)
Given:
executed with this command:
java Main one two three
What is the result?
Given the code fragment:
Path currentFile = Paths.get(“/scratch/exam/temp.txt”);
Path outputFile = Paths get(“/scratch/exam/new.txt”);
Path directory = Paths.get(“/scratch/”);
Files.copy(currentFile, outputFile);
Files.copy(outputFile, directory);
Files.delete (outputFile);
The /scratch/exam/temp.txt file exists. The /scratch/exam/new.txt and /scratch/new.txt files do not exist.
What is the result?
Why would you choose to use a peek operation instead of a forEach operation on a Stream?
Given:
Which statement on line 1 enables this code to compile?
Assume ds is a DataSource and the EMP table is defined appropriately.
What does executing this code fragment do?
Given:
What must be added in line 1 to compile this class?
Given:
Which two lines of code when inserted in line 1 correctly modifies instance variables? (Choose two.)
Which two expressions create a valid Java Path instance? (Choose two.)
Given the code fragment:
What is the result?
Which two statements set the default locale used for formatting numbers, currency, and percentages? (Choose two.)
Given the code fragment:
You want to display the value of currency as $100.00.
Which code inserted on line 1 will accomplish this?
Given:
Which two lines inserted in line 1 will allow this code to compile? (Choose two.)
Given:
Which three are correct? (Choose three.)
Given:
and the code fragment:
Which two Map objects group all employees with a salary greater than 30 by neighborhood? (Choose two.)
A)
B)
C)
D)
E)
Given:
Which would cause s to be AQCD?
You are working on a functional bug in a tool used by your development organization. In your investigation, you find that the tool is executed with a security policy file containing this grant.
What action should you take?
Given the code fragment:
Which two code snippets inserted independently inside println method print Mondial:domainmodel? (Choose two.)
Which code fragment prints 100 random numbers?
Given:
What is the result?
Given:
Which annotation should be used to remove warnings from compilation?
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:
What is the result?
Given:
When is the readObject method called?
Given:
var fruits = List.of(“apple”, “orange”, “banana”, “lemon”);
You want to examine the first element that contains the character n. Which statement will accomplish this?
Given:
List
list1.add(“A”);
list1.add(“B”);
List list2 = List.copyOf(list1);
list2.add(“C”);
List> list3 = List.of(list1, list2);
System.out.println(list3);
What is the result?
There is a copyServiceAPI that has the org.copyservice. spi. Copy interface
To use this service in a module, which module- info.java would be correct?
A)
B)
C)
D)
Given:
What is the output?
Given the code fragment:
What is the result?
Given the code fragment:
What is the result?