1Z0-816: Oracle Java SE 11 Programmer II Certification exam study guide with complete solutions already graded A+ 2024
01. Which interface in the ion package can return a primitive type? a) ToDoubleFunction b) Supplier c) BiFunction d) LongConsumer a) ToDoubleFunction 02. Which two statements independently compile? (Choose two.) a) List? super Short list = new ArrayListNumber(); b) List? super Number list = new ArrayListInteger(); c) List? extends Number list = new ArrayListByte(); d) List? extends Number list = new ArrayListObject(); e) Listlist = new ArrayList(); a) List? super Short list = new ArrayListNumber(); c) List? extends Number list = new ArrayListByte(); 03. Given the code fragment: 10. var lst = L(1, 2, 3, 4); 11. ceAll(x - x + 100); 12. Sln("-Completed-"); Which action enables to print -Completed-? a) Replacing line 10, with ListInteger lst = L(1,2,3,4); b) Replacing line 11, with ceAll(x = x + 100); c) Replacing line 10, with var lst = AList(1, 2, 3, 4); d) Replacing line 11, with Each(x - x + 100); c) Replacing line 10, with var lst = AList(1, 2, 3, 4); 04. var numbers = L(0,1,2,3,4,5,6,7,8,9); You want to calculate the average of numbers. Which two codes will accomplish this? (Choose two.) a) double avg = m().parallel().averagingDouble(a − a); b) double avg = lelStream().mapToInt (m − m).average().getAsDouble(); c) double avg = m().mapToInt (i − i).average().parallel(); d) double avg = m().average().getAsDouble(); b) double avg = lelStream().mapToInt (m − m).average().getAsDouble(); 05. Given the code fragment: StreamInteger numStream = S(10, 20, 30); numS(n - n + 10).peek(s - S(s)); numSEach(s - Sln(s)); What it the result? a) 203040 102030 b) 102030 203040 c) 102030 102030 d) An exception is thrown at runtime. d) An exception is thrown at runtime. To get success tips for Oracle 1Z0-816 Exam: Click Here: 06. Which code fragment does a service use to load the service provider with a Print interface? a) private Print print = ce.PInstance(); b) private .ServiceLoader loader = ServiceL(P); c) private .ServiceLoader loader = new .ServiceLoader(); d) private Print print = new ce.Provider.PrintImpl(); b) private .ServiceLoader loader = ServiceL(P); 07. Which two are guidelines for preventing denial of service attacks? a) Release resources in all cases. b) Resource limit checks should not suffer from numeric overflow. c) Purge sensitive information from exceptions. d) Validate file formats before processing untrusted files. e) Make public static fields final. f) Use mutable classes whenever possible. a) Release resources in all cases. b) Resource limit checks should not suffer from numeric overflow. 08. Given these named modular JARs and their module-info java files : module order { requires product; exports ; } : module product { exports ct; } Which is the only possible result of executing the command jdeps -s ? a) order - java. baseorder - product product - b) order - product c) product - order d) - product - order product - order a) order - java. baseorder - product product -
Written for
- Institution
- 1Z0-816: Oracle Java SE 11 Programmer
- Course
- 1Z0-816: Oracle Java SE 11 Programmer
Document information
- Uploaded on
- February 9, 2024
- Number of pages
- 5
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
1z0 816 oracle java se 11 programmer ii