Question: Which statements about the following application are true? (Choose two.) package party; import java.util.concurrent.*; public class Plan { Executor Service s = Executors.newScheduled ThreadPool (10);

Which statements about the following application are true? (Choose two.) 

package party; import java.util.concurrent.*; public class Plan { Executor Service s =

package party; import java.util.concurrent.*; public class Plan { Executor Service s = Executors.newScheduled ThreadPool (10); public void planEvents() { food"); Runnable r1 = () > System.out.print("Check Runnable r2 = () -> System.out.print("Check drinks"); Runnable r3 = () -> System.out.print("Take out trash"); s.scheduleWithFixed Delay (r1,1, TimeUnit. HOURS); s. scheduleAtFixed Rate (r2, 1, 1000, Time Unit. SECONDS); s.execute(r3); s.shutdownNow(); }} A. Line g1 does not compile. B. Line g2 does not compile. C. Line g3 does not compile. D. All of the lines of code compile. E. F. The code hangs indefinitely at runtime. The code throws an exception at runtime. // gl //g2 // g3

Step by Step Solution

3.43 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the Java code snippet provided lets review the statements to determine which ones are true A Line g1 does not compile B Line g2 does not comp... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Oracle Questions!