1z0-809試験無料問題集「Oracle Java SE 8 Programmer II 認定」

Given the code fragments:

and

What is the result?

Given:
public final class IceCream {
public void prepare() {}
}
public class Cake {
public final void bake(int min, int temp) {}
public void mix() {}
}
public class Shop {
private Cake c = new Cake ();
private final double discount = 0.25;
public void makeReady () { c.bake(10, 120); }
}
public class Bread extends Cake {
public void bake(int minutes, int temperature) {}
public void addToppings() {}
}
Which statement is true?

Which code fragment is required to load a JDBC 3.0 driver?

Given the code fragments:

and

What is the result?

Given:

and the code fragment:

What is the result?

Given the code fragment:

Assume that the value of now is 6:30 in the morning.
What is the result?

Given:

and the code fragment:

Which definition of the ColorSorter class sorts the blocks list?

Given the code fragment:
String str = "Java is a programming language";
ToIntFunction<String> indexVal = str: : indexOf; //line n1
int x = indexVal.applyAsInt("Java");//line n2
System.out.println(x);
What is the result?

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 the code fragments:
class MyThread implements Runnable {
private static AtomicInteger count = new AtomicInteger (0);
public void run () {
int x = count.incrementAndGet();
System.out.print (x+" ");
}
}
and
Thread thread1 = new Thread(new MyThread());
Thread thread2 = new Thread(new MyThread());
Thread thread3 = new Thread(new MyThread());
Thread [] ta = {thread1, thread2, thread3};
for (int x= 0; x < 3; x++) {
ta[x].start();
}
Which statement is true?