Java SE 8 Programmer II Free Practice Exam Questions

122 real Java SE 8 Programmer II exam questions with answers and AI explanations. Oracle certification prep — page 9 of 13.

  1. Question 114: Given the code fragment: public class Foo { public static void main (String [ ] args) { Map<Integer, String> unsortMap = new HashMap< > ( ); unsortMap.put (10,…
  2. Question 115: Given the code fragment: List<String> empDetails = Arrays.asList("100, Robin, HR", "200, Mary, AdminServices", "101, Peter, HR"); empDetails.stream() .filter(s…
  3. Question 118: Given: class Student { String course, name, city; public Student (String name, String course, String city) { this.course = course; this.name = name; this.city…
  4. Question 123: Given the code fragment: public class Foo { public static void main (String [ ] args) { Map<Integer, String> unsortMap = new HashMap< > ( ); unsortMap.put (10,…
  5. Question 125: Which two statements are true about the Fork/Join Framework? (Choose two.)
  6. Question 126: Which statement is true about the DriverManager class?
  7. Question 132: Which two are elements of a singleton class? (Choose two.)
  8. Question 136: Given that these files exist and are accessible: /sports/info.txt /sports/cricket/players.txt /sports/cricket/data/ODI.txt and given the code fragment: int max…
  9. Question 137: Given: class FuelNotAvailException extends Exception { } class Vehicle { void ride() throws FuelNotAvailException { //line n1 System.out.println("Happy Journey…
  10. Question 139: Which two statements are true about synchronization and locks? (Choose two.)