Chapter 13Practice Exam 2
Like Chapter 12, this chapter contains 50 questions and is designed to simulate a real 1Z0-829 exam. Ready with your scratch paper and 90 minutes? Good luck!
- Which statements about the following application are true? (Choose two.)
package party;
import java.util.concurrent.*;
public class Plan {
ExecutorService s = Executors.newScheduledThreadPool(10);
public void planEvents() {
Runnable r1 = () -> System.out.print("Check food");
Runnable r2 = () -> System.out.print("Check drinks");
Runnable r3 = () -> System.out.print("Take out trash");
s.scheduleWithFixedDelay(r1,1,TimeUnit.HOURS); // g1
s.scheduleAtFixedRate(r2,1,1000,TimeUnit.SECONDS); // g2
s.execute(r3); // g3
s.shutdownNow();
} }
- Line
g1
does ...
- Line
Get OCP Oracle Certified Professional Java SE 17 Developer Practice Tests now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.