Join the discussion
Question 1/133
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)

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)

Correct Answer: B
Add Comments
- Other Question (133q)
- Q1. A company has an existing Java app that includes two Java 8 jar files, sales-3.10. jar and...
- Q2. Given these declarations: (Exhibit) and these two code fragments: Fragment 1: (Exhibit) Fr...
- Q3. Given the code fragment: var pool = Executors.newFixedThreadPool(5); Future outcome = pool...
- Q4. Which statement about a functional interface is true?...
- Q5. How many Thing objects are eligible for garbage collection in line 1?...
- Q6. Given: (Exhibit) and (Exhibit) What is the result?...
- Q7. You are working on a functional bug in a tool used by your development organization. In yo...
- Q8. Given: (Exhibit) It is required that if p instanceof Pair then p.isValid() returns true. W...
- Q9. Given: (Exhibit) and (Exhibit) Which code fragment on line 1 makes the s1 set contain the ...
- Q10. Given: (Exhibit) What is the output? banana orange apple lemon...
- Q11. Given: (Exhibit) What is the output?
- Q12. Given: (Exhibit) What is the result?
- Q13. Given: (Exhibit) Which two statements are valid to be written in this interface? (Choose t...
- Q14. Which two commands are used to identify class and module dependencies? (Choose two.)...
- Q15. A company has an existing sales application using a Java 8 jar file containing packages: c...
- Q16. Given: (Exhibit) Which code fragment on line 1 makes the m map contain the employee with t...
- Q17. Which line of code results in a compilation error?...
- Q18. Given: (Exhibit) Which two are correct? (Choose two.)...
- Q19. Given: (Exhibit) What is the result?
- Q20. Given: (Exhibit) What code must you insert on Line 1 to enable the code to print Hello wor...
- Q21. Given: (Exhibit) Which option should you choose to enable the code to print Something happ...
- Q22. Given the code fragment: (Exhibit) Which can replace line 11?...
- Q23. Given: (Exhibit) What is the result?
- Q24. Given: (Exhibit) Which three are true? (Choose three.)...
- Q25. var numbers = List.of(0,1,2,3,4,5,6,7,8,9); You want to calculate the average of numbers. ...
- Q26. Which two are functional interfaces? (Choose two.) (Exhibit)...
- Q27. Given: (Exhibit) What is required to make the Foo class thread safe?...
- Q28. Given the code fragment: (Exhibit) What is the result?...
- Q29. Given: (Exhibit) executed using command: java Hello "Hello World" Hello World What is the ...
- Q30. Given: (Exhibit) What action ensures successful compilation?...
- Q31. Given: (Exhibit) Which three actions implement Java SE security guidelines? (Choose three....
- Q32. Given: (Exhibit) What is the output?
- Q33. Given the code fragment: Path currentFile = Paths.get("/scratch/exam/temp.txt"); Path outp...
- Q34. Which three guidelines are used to protect confidential information? (Choose three.)...
- Q35. Given the code fragment: (Exhibit) What is the result?...
- Q36. A bookstore's sales are represented by a list of Sale objects populated with the name of t...
- Q37. Given: (Exhibit) You want to implement the jav a. Io, serializable interface to the Mypers...
- Q38. Given: (Exhibit) Examine these requirements: * Eliminate code duplication. * Keep constant...
- Q39. A company has an existing sales application using a Java 8 jar file containing packages: c...
- Q40. Given the code fragment: List<Integer> list = List.of(11,12,13,12,13); Which stateme...
- Q41. Given: (Exhibit) What is the result?
- Q42. Your organization makes mlib.jar available to your cloud customers. While working on a cod...
- Q43. Given: var data = new ArrayList<>(); data.add("Peter"); data.add(30); data.add("Mark...
- Q44. Given: /code/a/Test.java containing: (Exhibit) and /code/b/Best.java containing: package b...
- Q45. (Exhibit) Why does this compilation fail?
- Q46. Given: (Exhibit) Which two methods facilitate valid ways to read instance fields? (Choose ...
- Q47. A bookstore's sales are represented by a list of Sale objects populated with the name of t...
- Q48. Given: jdeps -jdkinternals C:\workspace4\SimpleSecurity\jar\classes.jar Which describes th...
- Q49. (Exhibit) How many Thing objects are eligible for garbage collection in line 1?...
- Q50. Given: (Exhibit) You want to implement the java.io.Serializable interface to the MyPersist...
- Q51. Your organization makes mlib.jar available to your cloud customers. While working on a new...
- Q52. Given: (Exhibit) What is the result?
- Q53. Your organization makes mlib.jar available to your cloud customers. While working on a new...
- Q54. Given: (Exhibit) Which two changes need to be made to make this class compile? (Choose two...
- Q55. Given: (Exhibit) Which two lines of code when inserted in line 1 correctly modifies instan...
- Q56. (Exhibit) A) (Exhibit) B) (Exhibit) C) (Exhibit) D) (Exhibit)...
- Q57. Given: (Exhibit) executed with this command: java Main one two three What is the output of...
- Q58. Given an application with a main module that has this module-info.java file: (Exhibit) Whi...
- Q59. Given: (Exhibit) executed using this command: java Myclass My Car is red What is the outpu...
- Q60. Which code fragment represents a valid Comparatorimplementation?...
- Q61. Given: jdeps -jdkinternals C:\workspace4\SimpleSecurity\jar\classes.jar Which describes th...
- Q62. Given: (Exhibit) Which expression when added at line 1 will produce the output of 1.17?...
- Q63. Given: (Exhibit) This code results in a compilation error. Which code should be inserted o...
- Q64. Which two describe reasons to modularize the JDK? (Choose two.)...
- Q65. Which is true?
- Q66. Given: (Exhibit) and (Exhibit) What is the result?...
- Q67. Given: (Exhibit) What is the result?
- Q68. Given: (Exhibit) What is the result?
- Q69. Given this enum declaration: (Exhibit) Examine this code: System.out.println(Letter.values...
- Q70. Given the code fragment: (Exhibit) What is the result?...
- Q71. Given: (Exhibit) Which is true?
- Q72. Given: (Exhibit) Which statement on line 1 enables this code fragment to compile?...
- Q73. Given: (Exhibit) What is the result?
- Q74. Given: (Exhibit) Which one is correct?
- Q75. Given: (Exhibit) You want to obtain the Filechannel object on line 1. Which code fragment ...
- Q76. Given: (Exhibit) Which two are correct? (Choose two.)...
- Q77. Given: (Exhibit) What is the result?
- Q78. Given: (Exhibit) What is the result?
- Q79. Given the code fragment: (Exhibit) What change on line 1 will make this code compile?...
- Q80. Given the code fragment: (Exhibit) What is the result? A) (Exhibit) B) (Exhibit) C) (Exhib...
- Q81. Given: (Exhibit) executed with this command: java Main one two three What is the result?...
- Q82. Given: (Exhibit) and (Exhibit) Which two method definitions at line n1 in the Bar class co...
- Q83. Given: (Exhibit) executed using command: java Hello "Hello World" Hello World What is the ...
- Q84. Given the code fragment: (Exhibit) You want to examine whether path is a directory. Which ...
- Q85. Given: (Exhibit) Which two are secure serialization of these objects? (Choose two.)...
- Q86. Given the code fragment: (Exhibit) What is the output?...
- Q87. Given: (Exhibit) Which two allow a.Main to allocate a new Person? (Choose two.)...
- Q88. Given: (Exhibit) Which two lines can replace line 1 so that the Y class compiles? (Choose ...
- Q89. Given: (Exhibit) What is the result?
- Q90. Given: (Exhibit) What must be added in line 1 to compile this class?...
- Q91. Given: (Exhibit) What is the result?
- Q92. Given: (Exhibit) Which two constructors will compile and set the class field strings? (Cho...
- Q93. Given: List<String> list1 = new ArrayList<>(); list1.add("A"); list1.add("B");...
- Q94. Given: (Exhibit) Which two methods facilitate valid ways to read instance fields? (Choose ...
- Q95. Given: (Exhibit) Which two methods facilitate valid ways to read instance fields? (Choose ...
- Q96. Given: (Exhibit) What is the result?
- Q97. Which two interfaces are considered to be functional interfaces? (Choose two.)...
- Q98. Given: (Exhibit) What is true?
- Q99. Given: (Exhibit) What is the result?
- Q100. Which statement about access modifiers is correct?...
- Q101. Given: (Exhibit) What is the type of x?
- Q102. Given: (Exhibit) Which two lines of code when inserted in line 1 correctly modifies instan...
- Q103. Given the code fragment: (Exhibit) What is the result?...
- Q104. Given the code fragment: (Exhibit) Which two statement inserted independently at line 1 en...
- Q105. Given: (Exhibit) and omitting the throws FooException clause results in a compilation erro...
- Q106. Given the code fragment: (Exhibit) What is the result?...
- Q107. Given: (Exhibit) You want the code to produce this output: John Joe Jane Which code fragme...
- Q108. Given: public class X { } and public final class Y extends X { } What is the result of com...
- Q109. Given the code fragment: (Exhibit) What is the result?...
- Q110. Given: (Exhibit) Why does D cause a compilation error?...
- Q111. Given: (Exhibit) What is the result?
- Q112. Given: (Exhibit) What is the output?
- Q113. Which three initialization statements are correct? (Choose three.)...
- Q114. Given: (Exhibit) Which two methods modify field values? (Choose two.)...
- Q115. Given: (Exhibit) and the code fragment: Which two Map objects group all employees with a s...
- Q116. Given: (Exhibit) What is the result?
- Q117. Assuming the Widget class has a getPrice method, this code does not compile: (Exhibit) Whi...
- Q118. Which code is correct?
- Q119. Given: (Exhibit) It is required that if p instanceof Pair then p.isValid() returns true. W...
- Q120. Given: (Exhibit) What is the result?
- Q121. Which set of commands is necessary to create and run a custom runtime image from Java sour...
- Q122. Given: (Exhibit) What is the result?
- Q123. You replace the code on line 1 to use ParallelStream. (Exhibit) Which one is correct?...
- Q124. Given: (Exhibit) Which would cause s to be AQCD?...
- Q125. Which method throws an exception for not-a-number and infinite input values? A) (Exhibit) ...
- Q126. Given: (Exhibit) What is the result?
- Q127. Given the code fragment: (Exhibit) What is the result?...
- Q128. Given the code fragment: (Exhibit) Which code fragment replaces the for statement?...
- Q129. Given: (Exhibit) What is the result?
- Q130. Given: (Exhibit) Which code, when inserted at one or more marked positions, would allow cl...
- Q131. Given: (Exhibit) What is the result?
- Q132. Given: public class X { } and public final class Y extends X { } What is the result of com...
- Q133. Given: (Exhibit) What is the result?
