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

  1. Question 161: Given the code fragment: class CallerThread implements Callable<String> { String str; public CallerThread(String s) {this.str=s;} public String call() throws E…
  2. Question 163: Given: 1. abstract class Shape { 2. Shape ( ) { System.out.println ("Shape"); } 3. protected void area ( ) { System.out.println ("Shape"); } 4. } 5. 6. class S…
  3. Question 164: Given: class FuelNotAvailException extends Exception { } class Vehicle { void ride() throws FuelNotAvailException { //line n1 System.out.println("Happy Journey…
  4. Question 174: What is true about the java.sql.Statement interface?
  5. Question 177: Given the code fragments: class ThreadRunner implements Runnable { public void run () { System.out.print ("Runnable") ; } } class ThreadCaller implements Calla…
  6. Question 182: Given the content of /resourses/Message.properties: welcome1="Good day!" and given the code fragment: Properties prop = new Properties (); FileInputStream fis…
  7. Question 183: Given: final class Folder { //line n1 //line n2 public void open () { System.out.print("Open"); } } public class Test { public static void main (String [] args…
  8. Question 184: Given: class UserException extends Exception { } class AgeOutOfLimitException extends UserException { } and the code fragment: class App { public void doRegist…
  9. Question 188: You want to create a singleton class by using the Singleton design pattern. Which two statements enforce the singleton nature of the design? (Choose two.)
  10. Question 189: Which statement is true about the single abstract method of the java.util.function.Predicate interface?