Download Java SE 11 Programmer II.VCEPlus.1z0-816.2020-05-03.1e.80q.vcex

Download Exam

File Info

Exam Java SE 11 Programmer II
Number 1z0-816
File Name Java SE 11 Programmer II.VCEPlus.1z0-816.2020-05-03.1e.80q.vcex
Size 9.13 Mb
Posted May 03, 2020
Downloads 39

How to open VCEX & EXAM Files?

Files with VCEX & EXAM extensions can be opened by ProfExam Simulator.

Purchase
Coupon: EXAM_HUB

Discount: 20%

 
 



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?

  • A: /scratch/exam/new.txt and /scratch/new.txt are deleted.
  • B: The program throws a FileaAlreadyExistsException.
  • C: The program throws a NoSuchFileException.
  • D: A copy of /scratch/exam/new.txt exists in the /scratch directory and /scratch/exam/new.txt is deleted.



Question 2
Which two are functional interfaces? 
(Choose two.)

  • A:
     
  • B:
     
  • C:
  • D:
  • E:



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.)

  • A: @Resource(priority=100)
  • B: @Resource(priority=0)
  • C: @Resource(name=“Customer1”, priority=100)
  • D: @Resource(name=“Customer1”)
  • E: @Resource



Question 4
Given:  

  
   
Which two interfaces can be used in lambda expressions? (Choose two.)   

  • A: MyInterface1
  • B: MyInterface3
  • C: MyInterface5
  • D: MyInterface2
  • E: MyInterface4



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?

  • A: final String getFirstLetter() 
  • B: static String getFirstLetter() 
  • C: static String getFirstLetter() 
  • D: String getFirstLetter() 



Question 6
Given these two classes:  

  

  
   
And given this fragment:  

  
   
Which describes the fragment?   

  • A: It throws IllegalMonitorStateException.
  • B: It is subject to deadlock.
  • C: It is subject to livelock.
  • D: The code does not compile.



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?

  • A:  
     
  • B:
     
  • C:
     
  • D:
     



Question 8
Given:  

  
   
Which one is correct?

  • A: An IllegalThreadStateException is thrown at run time.
  • B: Three threads are created.
  • C: The compilation fails.
  • D: Four threads are created. 



Question 9
Which code fragment does a service use to load the service provider with a Print interface?

  • A: private Print print = com.service.Provider.getInstance();
  • B: private java.util.ServiceLoader<Print> loader = ServiceLoader.load(Print.class);
  • C: private java.util.ServiceLoader<Print> loader = new java.util.ServiceLoader<>();
  • D: private Print print = new com.service.Provider.PrintImpl();



Question 10
Examine these module declarations:  

  
   
Which two statements are correct? (Choose two.)

  • A: The ServiceProvider module is the only module that, at run time, can provide the com.example.api API.
  • B: The placement of the com.example.api API in a separate module, ServiceAPI, makes it easy to install multiple provider modules.
  • C: The Consumer module should require the ServiceProvider module.
  • D: The ServiceProvider module should export the com.myimpl package. 
  • E: The ServiceProvider module does not know the identity of a module (such as Consumer) that uses the com.example.api API.






CONNECT US


ProfExam
PROFEXAM WITH A 20% DISCOUNT

You can buy ProfExam with a 20% discount..

Get Now!


HOW TO OPEN VCEX AND EXAM FILES

Use ProfExam Simulator to open VCEX and EXAM files
ProfExam Screen



HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset