Oracle 1z0-809 - Java SE 8 Programmer II
Which two methods from the java.util.stream.Stream interface perform a reduction operation? (Choose two.)
Which two code blocks correctly initialize a Locale variable? (Choose two.)
Given:
and the code fragment:
What is the result?
Given the code fragments:
class ThreadRunner implements Runnable {
public void run () { System.out.print (“Runnableâ€) ; }
}
class ThreadCaller implements Callable {
Public String call () throws Exception {return “Callableâ€; )
}
and
ExecutorService es = Executors.newCachedThreadPool ();
Runnable r1 = new ThreadRunner ();
Callable c1 = new ThreadCaller ();
// line n1
es.shutdown();
Which code fragment can be inserted at line n1 to start r1 and c1 threads?
and the code fragment?
What is the result?
Which code fragment is required to load a JDBC 3.0 driver?
Given the code fragment:
LocalDate valentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14);
LocalDate next15days = valentinesDay.plusDays (15);
LocalDate nextYear = next15days.plusYears(1); // line n1
System.out.println(nextYear);
What is the result?
Given:
and the code fragment:
Which two code fragments, when inserted at line n1 independently, enable the code to print TruckCarBike?