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 3 of 13.

  1. Question 21: Which action can be used to load a database driver by using JDBC3.0?
  2. Question 22: Given the structure of the STUDENT table: Student (id INTEGER, name VARCHAR) Given: public class Test { static Connection newConnection =null; public static Co…
  3. Question 23: Given: public class Test<T> { private T t; public T get () { return t; } public void set (T t) { this.t = t; } public static void main (String args [ ] ) { Tes…
  4. Question 24: Given the definition of the Vehicle class: class Vehicle { String name; void setName (String name) { this.name = name; } String getName() { return name; } } Wh…
  5. Question 25: Given the code fragment: List<String> empDetails = Arrays.asList("100, Robin, HR", "200, Mary, AdminServices", "101, Peter, HR"); empDetails.stream() .filter(s…
  6. Question 26: Given the code fragment: List<Integer> nums = Arrays.asList (10, 20, 8): System.out.println ( //line n1 ); line n1 to enable the code to print the maximum numb…
  7. Question 27: Given the code fragment: class CallerThread implements Callable<String> { String str; public CallerThread(String s) {this.str=s;} public String call() throws E…
  8. Question 28: Given the code fragment: public class FileThread implements Runnable { String fName; public FileThread(String fName) { this.fName = fName; } public void run ()…
  9. Question 29: Given: interface Rideable {Car getCar (String name); } class Car { private String name; public Car (String name) { this.name = name; } } Which code fragment cr…
  10. Question 30: java.util.function.Function interface? Which statement is true about the single abstract method of the void.