Download Java SE 11 Programmer II.1z0-816.VCEplus.2020-05-03.80q.vcex

Vendor: Oracle
Exam Code: 1z0-816
Exam Name: Java SE 11 Programmer II
Date: May 03, 2020
File Size: 9 MB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

Demo Questions

Question 1
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?
  1. /scratch/exam/new.txt and /scratch/new.txt are deleted.
  2. The program throws a FileaAlreadyExistsException.
  3. The program throws a NoSuchFileException.
  4. A copy of /scratch/exam/new.txt exists in the /scratch directory and /scratch/exam/new.txt is deleted.
Correct answer: C
Explanation:
  
  
Question 2
Which two are functional interfaces? 
(Choose two.)
  1.  
  2.  
Correct answer: CE
Explanation:
Reference: http://tutorials.jenkov.com/java-functional-programming/functional-interfaces.html
Reference: http://tutorials.jenkov.com/java-functional-programming/functional-interfaces.html
Question 3
Given the declaration:  
  
   
Examine this code fragment:  
/* Loc1 */ class ProcessOrders    
Which two annotations may be applied at Loc1 in the code fragment? (Choose two.)
  1. @Resource(priority=100)
  2. @Resource(priority=0)
  3. @Resource(name=“Customer1”, priority=100)
  4. @Resource(name=“Customer1”)
  5. @Resource
Correct answer: AB
Explanation:
Question 4
Given:  
  
   
Which two interfaces can be used in lambda expressions? (Choose two.)   
  1. MyInterface1
  2. MyInterface3
  3. MyInterface5
  4. MyInterface2
  5. MyInterface4
Correct answer: CD
Explanation:
Reference: https://dzone.com/articles/functional-interface-and-lambda-expression
Reference: https://dzone.com/articles/functional-interface-and-lambda-expression
Question 5
Given this enum declaration:  
  
   
Examine this code:  
System.out.println(Alphabet.getFirstLetter());   
What code should be written at line 3 to make this code print A?
  1. final String getFirstLetter() 
  2. static String getFirstLetter() 
  3. static String getFirstLetter() 
  4. String getFirstLetter() 
Correct answer: C
Question 6
Given these two classes:  
  
  
   
And given this fragment:  
  
   
Which describes the fragment?   
  1. It throws IllegalMonitorStateException.
  2. It is subject to deadlock.
  3. It is subject to livelock.
  4. The code does not compile.
Correct answer: D
Question 7
Given:  
  
   
Examine these requirements:  
  • Eliminate code duplication.   
  • Keep constant the number of methods other classes may implement from this interface.   
Which method can be added to meet these requirements?
  1.   
  2.  
  3.  
  4.  
Correct answer: A
Question 8
Given:  
  
   
Which one is correct?
  1. An IllegalThreadStateException is thrown at run time.
  2. Three threads are created.
  3. The compilation fails.
  4. Four threads are created. 
Correct answer: A
Explanation:
  
  
Question 9
Which code fragment does a service use to load the service provider with a Print interface?
  1. private Print print = com.service.Provider.getInstance();
  2. private java.util.ServiceLoader<Print> loader = ServiceLoader.load(Print.class);
  3. private java.util.ServiceLoader<Print> loader = new java.util.ServiceLoader<>();
  4. private Print print = new com.service.Provider.PrintImpl();
Correct answer: B
Explanation:
Reference: https://docs.oracle.com/javase/8/docs/api/?java/util/ServiceLoader.html
Reference: https://docs.oracle.com/javase/8/docs/api/?java/util/ServiceLoader.html
Question 10
Examine these module declarations:  
  
   
Which two statements are correct? (Choose two.)
  1. The ServiceProvider module is the only module that, at run time, can provide the com.example.api API.
  2. The placement of the com.example.api API in a separate module, ServiceAPI, makes it easy to install multiple provider modules.
  3. The Consumer module should require the ServiceProvider module.
  4. The ServiceProvider module should export the com.myimpl package. 
  5. The ServiceProvider module does not know the identity of a module (such as Consumer) that uses the com.example.api API.
Correct answer: AC
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!